From 5b9b079dabc7f71463cea3f0c6a92f338935039d Mon Sep 17 00:00:00 2001 From: Frank Riley Date: Sun, 21 Mar 2021 08:58:16 -0700 Subject: Add cache eviction metrics to the cache plugin (#4411) Signed-off-by: Frank Riley --- plugin/cache/metrics.go | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'plugin/cache/metrics.go') diff --git a/plugin/cache/metrics.go b/plugin/cache/metrics.go index b4b11ae26..f502c238d 100644 --- a/plugin/cache/metrics.go +++ b/plugin/cache/metrics.go @@ -50,4 +50,11 @@ var ( Name: "served_stale_total", Help: "The number of requests served from stale cache entries.", }, []string{"server"}) + // evictions is the counter of cache evictions. + evictions = promauto.NewCounterVec(prometheus.CounterOpts{ + Namespace: plugin.Namespace, + Subsystem: "cache", + Name: "evictions_total", + Help: "The count of cache evictions.", + }, []string{"server", "type"}) ) -- cgit v1.2.3