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

Enriched select hints #5984

Open
fpetkovski opened this issue Dec 20, 2022 · 1 comment
Open

Enriched select hints #5984

fpetkovski opened this issue Dec 20, 2022 · 1 comment

Comments

@fpetkovski
Copy link
Contributor

Is your proposal related to a problem?

The hints which are extracted by the PromQL engine are hard to extend at the moment. Their use is also fairly limited since they treat windowing functions the same way as aggregations. Furthermore, because hints are a generic API for many different remote-read storage systems, they are fairly rigid and hard to change and evolve.

Examples where we are limited by query hints at the moment:

Describe the solution you'd like

I would like to propose extracting better hints in Thanos and propagating them to underlying stores through the Thanos Store API. One way to do it is to traverse the PromQL AST before execution and extract hints for the selectors. Hints are linked to selectors by injecting a special label which is stripped when doing the actual select call: #5983.

Describe alternatives you've considered

One alternative is to extend the select hints in Prometheus itself, but this seems to be quite challenging since reviewers lack context on how the additional fields will be used. Even something like prometheus/prometheus#11163 took a very long time to get merged.

@fpetkovski fpetkovski mentioned this issue Dec 20, 2022
2 tasks
@fpetkovski
Copy link
Contributor Author

I've raised #6012 which can solve some of the problems described in this issue.

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

No branches or pull requests

1 participant