From c87ab0a84c886808306346d8f4f5ef9e050dbae1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=F0=9F=8C=B2=20Harry=20=F0=9F=8C=8A=20John=20=F0=9F=8F=94?= Date: Fri, 1 Apr 2022 10:58:35 -0700 Subject: [PATCH] Fix incorrectly named cache metrics MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 🌲 Harry 🌊 John 🏔 --- CHANGELOG.md | 1 + pkg/chunk/cache/instrumented.go | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4c8d3d20922..93522b41164 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ## master / unreleased * [FEATURE] Ruler: Add `external_labels` option to tag all alerts with a given set of labels. +* [CHANGE] Fix incorrectly named `cortex_cache_fetched_keys` and `cortex_cache_hits` metrics. Renamed to `cortex_cache_fetched_keys_total` and `cortex_cache_hits_total` respectively. #4686 ## 1.12.0 in progress diff --git a/pkg/chunk/cache/instrumented.go b/pkg/chunk/cache/instrumented.go index ca27d4a3b4e..0f4b1d1178a 100644 --- a/pkg/chunk/cache/instrumented.go +++ b/pkg/chunk/cache/instrumented.go @@ -38,14 +38,14 @@ func Instrument(name string, cache Cache, reg prometheus.Registerer) Cache { fetchedKeys: promauto.With(reg).NewCounter(prometheus.CounterOpts{ Namespace: "cortex", - Name: "cache_fetched_keys", + Name: "cache_fetched_keys_total", Help: "Total count of keys requested from cache.", ConstLabels: prometheus.Labels{"name": name}, }), hits: promauto.With(reg).NewCounter(prometheus.CounterOpts{ Namespace: "cortex", - Name: "cache_hits", + Name: "cache_hits_total", Help: "Total count of keys found in cache.", ConstLabels: prometheus.Labels{"name": name}, }),