Skip to content
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

Fix 'op' label values for cortex_query_frontend_queries_total metric #7207

Merged
merged 2 commits into from
Jan 25, 2024

Conversation

pracucci
Copy link
Collaborator

What this PR does

Today I noticed that the op label value reported by cortex_query_frontend_queries_total may be wrong because it uses op="query" for any non range query. This PR fixes it, using the same label values we use for caching metrics.

Which issue(s) this PR fixes or relates to

N/A

Checklist

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

Signed-off-by: Marco Pracucci <marco@pracucci.com>
Comment on lines -323 to -325
body, err := io.ReadAll(resp.Body)
require.NoError(t, err)
require.Equal(t, `{"status":""}`, string(body))
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Note to reviewers: removed because the response content is different based on the request type. I don't think it's particularly important to assert on it, given this test is specifically designed to assert tracked metrics.

@pracucci pracucci marked this pull request as ready for review January 24, 2024 18:01
@pracucci pracucci requested a review from a team as a code owner January 24, 2024 18:01
Copy link
Contributor

@56quarters 56quarters left a comment

Choose a reason for hiding this comment

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

Nice find!

Signed-off-by: Marco Pracucci <marco@pracucci.com>
@pracucci pracucci merged commit 59ce979 into main Jan 25, 2024
28 checks passed
@pracucci pracucci deleted the fix-cortex_query_frontend_queries_total branch January 25, 2024 07:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants