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

Proposal: expose bucket store queryStats as part of Series response hints #6344

Closed
yeya24 opened this issue May 8, 2023 · 2 comments · Fixed by #6352
Closed

Proposal: expose bucket store queryStats as part of Series response hints #6344

yeya24 opened this issue May 8, 2023 · 2 comments · Fixed by #6352

Comments

@yeya24
Copy link
Contributor

yeya24 commented May 8, 2023

Is your proposal related to a problem?

Thanos Store Gateway collects query stats in https://github.com/thanos-io/thanos/blob/main/pkg/store/bucket.go#L3050 during Series request. However, for projects that use Thanos as a library, such as Cortex, there is no way to utilize that queryStats.

The queryStats got collected and will only be logged in debug mode. However, it is usually quite expensive to enable debug if we only want to utilize some of the fields in queryStats.

Describe the solution you'd like

Add a bool field called to enable return queryStats in https://github.com/thanos-io/thanos/blob/main/pkg/store/hintspb/hints.proto#L22.

Accordingly, the query stats fields will be added into the hints response here https://github.com/thanos-io/thanos/blob/main/pkg/store/hintspb/hints.proto#L29.

@yeya24 yeya24 changed the title Proposal: expose bucket store queryStats as part of Series response Proposal: expose bucket store queryStats as part of Series response hints May 8, 2023
@GiedriusS
Copy link
Member

Sounds good to me. We might want to utilize that too somehow for the Explain/Explain analyze functionality in the new PromQL engine.

@christopherzli
Copy link

Nice work, just curious why we only expose store gateway, but not entire store api including receiver. Would that be an extension?

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

Successfully merging a pull request may close this issue.

3 participants