-
Notifications
You must be signed in to change notification settings - Fork 9k
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
PromQL: scalar comparison for range selector #10399
Comments
cc @juliusv |
No strong opinion on this yet, but once we go that direction, we could also consider a whole lot more variations:
|
What would it change for instant vector? For instant vector this should already work with current promql. |
I mean between a range vector and an instant vector: |
I think we can limit this to scalar for now. |
@roidelapluie I would like to work on this proposal. |
@roidelapluie, as per my understanding, when applying a scalar on to a range vector, does this illustration below depict the correct behavior / results or the expected outcome is something else. Request your feedback here, please. Input:
expected outcome
|
Proposal
Use case. Why is this important?
It would be great if we could do:
avg_over_time(probe_duration_seconds[10m] != 0)
. This could happen between a range selector and scalars. This would work directly on the samples of the selection, samples not matching would be dropped. This could be combined:avg_over_time(probe_duration_seconds[10m] > 0 < 10)
This is more effective that doing a subquery, which, additionally, requires you to know the scrape interval.
The text was updated successfully, but these errors were encountered: