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

retrieve peakSamples and processedSamples query stats from results_cache #6591

Merged
merged 1 commit into from
Feb 18, 2025

Conversation

erlan-z
Copy link
Contributor

@erlan-z erlan-z commented Feb 14, 2025

What this PR does:
with this PR, peakSamples and processedSamples was added to query stats. They work when queries are directly queried from datasource, and doesn't apply for results_cache.

this PR will populate those fields for query stats for responses from results cache

Which issue(s) this PR fixes:
Fixes #

Checklist

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

@@ -409,6 +409,7 @@ func (f *Handler) reportQueryStats(r *http.Request, source, userID string, query
"split_queries", splitQueries,
"status_code", statusCode,
"response_size", contentLength,
"samples_processed", numScannedSamples,
Copy link
Contributor

Choose a reason for hiding this comment

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

Why we don't call it samples_scanned? queryScannedSamples metric is named cortex_query_samples_scanned_total so we should be consistent here

@yeya24
Copy link
Contributor

yeya24 commented Feb 16, 2025

Seems there are files unrelated to this PR. Can you remove them?

@erlan-z erlan-z force-pushed the query-stats-from-results-cache branch from b4200d5 to 70bf569 Compare February 18, 2025 19:50
@erlan-z erlan-z force-pushed the query-stats-from-results-cache branch from 70bf569 to 508b9b8 Compare February 18, 2025 21:54
Copy link
Contributor

@yeya24 yeya24 left a comment

Choose a reason for hiding this comment

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

Thanks

@yeya24 yeya24 merged commit 7292d8d into cortexproject:master Feb 18, 2025
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants