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

Conversation

harry671003
Copy link
Contributor

Signed-off-by: 🌲 Harry 🌊 John 🏔 [email protected]

What this PR does:
The following query-frontend cache metrics are incorrectly named.

# HELP cortex_cache_fetched_keys Total count of keys requested from cache.
# TYPE cortex_cache_fetched_keys counter
cortex_cache_fetched_keys{name="frontend.memcache"} 872
# HELP cortex_cache_hits Total count of keys found in cache.
# TYPE cortex_cache_hits counter
cortex_cache_hits{name="frontend.memcache"} 869

These counter metrics are not ending in total as per the convention.

Which issue(s) this PR fixes:
Fixes #4685

Checklist

  • Tests updated
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

Copy link
Contributor

@pracucci pracucci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Renaming metrics is always a bit annoying because it may break dashboards and alerts. I don't want to block this PR, but be aware this may be considered a [CHANGE] instead of a [BUGFIX].

CHANGELOG.md Outdated
@@ -3,6 +3,7 @@
## master / unreleased

* [FEATURE] Ruler: Add `external_labels` option to tag all alerts with a given set of labels.
* [BUGFIX] Fix incorrectly named `cortex_cache_fetched_keys` and `cortex_cache_hits` metrics. #4686
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest to both mention the old and new name, to help users better understand the change.

Signed-off-by: 🌲 Harry 🌊 John 🏔 <[email protected]>
@alanprot
Copy link
Member

alanprot commented Apr 1, 2022

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cache hits and fetched_keys counter metrics are missing the total suffix
3 participants