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

Implement metadata API limit param #7575

Open
2 of 4 tasks
harry671003 opened this issue Jul 31, 2024 · 0 comments
Open
2 of 4 tasks

Implement metadata API limit param #7575

harry671003 opened this issue Jul 31, 2024 · 0 comments

Comments

@harry671003
Copy link
Contributor

harry671003 commented Jul 31, 2024

Is your proposal related to a problem?

The metadata APIs like /api/v1/series, /api/v1/labels, /api/v1/label/<name>/values often timeout when queried with a lot of data.
Recently Prometheus introduced a new limit param in the above APIs for limiting the amount of data returned. This change was implemented in:

However, we currently don't make use of this information, so the stores may do a bunch of work retrieving values that will then be thrown away in the querier.

Describe the solution you'd like

Thanos stores should truncate the results if the limit param is set and return only the required number of results

Describe alternatives you've considered

(Write your answer here.)

Additional context

prometheus/prometheus#12795 has more context about this problem.

Work tracker

  • Implement limit param in APIs
  • Implement limit param in stores
  • Smaller improvements
  • Acceptance tests
@harry671003 harry671003 changed the title Implement metadata API limit param in stores Implement metadata API limit param Aug 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants