From 3fdbf11f637cd324d755c5469d7cb18e23e71017 Mon Sep 17 00:00:00 2001 From: Lucas Francisco Lopez Date: Fri, 19 Apr 2024 13:58:59 +0200 Subject: [PATCH] Fix cacheSetsMetric --- pkg/zrouter/zmiddlewares/cache.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/zrouter/zmiddlewares/cache.go b/pkg/zrouter/zmiddlewares/cache.go index 0e1bf5a..1080f5d 100644 --- a/pkg/zrouter/zmiddlewares/cache.go +++ b/pkg/zrouter/zmiddlewares/cache.go @@ -116,7 +116,7 @@ func cacheResponseIfNeeded(rw *responseWriter, r *http.Request, cache zcache.ZCa return } - if err := metricServer.IncrementMetric(cacheSetsMetric, GetRoutePattern(r)); err != nil { + if err := metricServer.IncrementMetric(cacheSetsMetric, GetSubRoutePattern(r), GetRoutePattern(r)); err != nil { logger.GetLoggerFromContext(r.Context()).Errorf("Error incrementing cache_sets metric: %v", err) } }