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

per-tenant metrics on chunks-per-query, chunk-size-bytes-per-query, and fetched-series-per-query #4259

Closed
alvinlin123 opened this issue Jun 3, 2021 · 1 comment · Fixed by #4343

Comments

@alvinlin123
Copy link
Contributor

Is your feature request related to a problem? Please describe.
To better understand what values we can set for each user for querier.max-fetched-chunks-per-query, querier.max-fetched-series-per-query, and querier.max-fetched-chunk-bytes-per-query, it would be invaluable to see the user's current number on fetched-chunks-per-query, fetched-chunk-bytes-per-query, and fetched-series-per-query.

Describe the solution you'd like
per-tenant and global histogram metrics for fetched-chunks-per-query, fetched-chunk-bytes-per-query, and fetched-series-per-query on querier side.

Describe alternatives you've considered
Trial and error.

Additional context
N/A

@tomwilkie
Copy link
Contributor

(As discussed on a call)

  • need to think very carefully about any per-user metrics, they are very expensive.
  • can't have per-user histograms, the cardinality is just too high
  • could sample a gauge (and use a very long average_over_time) but its noisey and not very clear what signal you're getting
  • could have a sum and a count metric, and have accurate averages - but not clear what the avg is telling you.
  • could use a summary exporting a single quantile (0.99) as a pseudo-moving-max
  • personally, I would stick this in the logs.

pstibrany pushed a commit that referenced this issue Jul 20, 2021
* Add per-user query metrics for series and bytes returned

Add stats included in query responses from the querier and distributor
for measuring the number of series and bytes included in successful
queries. These stats are emitted per-user as summaries from the query
frontends.

These stats are picked to add visibility into the same resources limited
as part of #4179 and #4216.

Fixes #4259

Signed-off-by: Nick Pillitteri <nick.pillitteri@grafana.com>

* Formatting fix

Signed-off-by: Nick Pillitteri <nick.pillitteri@grafana.com>

* Fix changelog to match actual changes

Signed-off-by: Nick Pillitteri <nick.pillitteri@grafana.com>

* Typo

Signed-off-by: Nick Pillitteri <nick.pillitteri@grafana.com>

* Code review changes, rename things for clarity

Signed-off-by: Nick Pillitteri <nick.pillitteri@grafana.com>

* Apply suggestions from code review

Co-authored-by: Marco Pracucci <marco@pracucci.com>
Signed-off-by: Nick Pillitteri <nick.pillitteri@grafana.com>

* Code review changes, remove superfluous summaries

Signed-off-by: Nick Pillitteri <nick.pillitteri@grafana.com>

Co-authored-by: Marco Pracucci <marco@pracucci.com>
alvinlin123 pushed a commit to ac1214/cortex that referenced this issue Jan 14, 2022
…ct#4343)

* Add per-user query metrics for series and bytes returned

Add stats included in query responses from the querier and distributor
for measuring the number of series and bytes included in successful
queries. These stats are emitted per-user as summaries from the query
frontends.

These stats are picked to add visibility into the same resources limited
as part of cortexproject#4179 and cortexproject#4216.

Fixes cortexproject#4259

Signed-off-by: Nick Pillitteri <nick.pillitteri@grafana.com>

* Formatting fix

Signed-off-by: Nick Pillitteri <nick.pillitteri@grafana.com>

* Fix changelog to match actual changes

Signed-off-by: Nick Pillitteri <nick.pillitteri@grafana.com>

* Typo

Signed-off-by: Nick Pillitteri <nick.pillitteri@grafana.com>

* Code review changes, rename things for clarity

Signed-off-by: Nick Pillitteri <nick.pillitteri@grafana.com>

* Apply suggestions from code review

Co-authored-by: Marco Pracucci <marco@pracucci.com>
Signed-off-by: Nick Pillitteri <nick.pillitteri@grafana.com>

* Code review changes, remove superfluous summaries

Signed-off-by: Nick Pillitteri <nick.pillitteri@grafana.com>

Co-authored-by: Marco Pracucci <marco@pracucci.com>
Signed-off-by: Alvin Lin <alvinlin@amazon.com>
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 a pull request may close this issue.

2 participants