Skip to content

Fix incorrectly named cache metrics #4686

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions pkg/chunk/cache/instrumented.go
Original file line number Diff line number Diff line change
Expand Up @@ -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},
}),
Expand Down