plugin/forward: add hit/miss metrics for connection cache (#4114)

Signed-off-by: Ruslan Drozhdzh <rdrozhdzh@infoblox.com>
This commit is contained in:
Ruslan Drozhdzh 2020-09-14 12:42:55 +03:00 committed by GitHub
parent 2fe5d684f9
commit 30a4a87eaa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 18 additions and 2 deletions

View file

@ -52,4 +52,16 @@ var (
Name: "max_concurrent_rejects_total",
Help: "Counter of the number of queries rejected because the concurrent queries were at maximum.",
})
ConnCacheHitsCount = promauto.NewCounterVec(prometheus.CounterOpts{
Namespace: plugin.Namespace,
Subsystem: "forward",
Name: "conn_cache_hits_total",
Help: "Counter of connection cache hits per upstream and protocol.",
}, []string{"to", "proto"})
ConnCacheMissesCount = promauto.NewCounterVec(prometheus.CounterOpts{
Namespace: plugin.Namespace,
Subsystem: "forward",
Name: "conn_cache_misses_total",
Help: "Counter of connection cache misses per upstream and protocol.",
}, []string{"to", "proto"})
)