You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
I am currently looking into implementing a Thanos Store for the Stackdriver API. Stackdriver can do aggregations but requires a so-called alignment function to align timestamps from individual series. Most windowing functions from PromQL (rate, delta, *_over_time) can be translated to aligners in Stackdriver.
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.
The text was updated successfully, but these errors were encountered:
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:
topk and bottomk
: SelectHints should contain function parameters in addition to the function name prometheus/prometheus#9979rate
,delta
,*_over_time
) can be translated to aligners in Stackdriver.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.
The text was updated successfully, but these errors were encountered: