-
Notifications
You must be signed in to change notification settings - Fork 9.7k
promql: add ts_of_(min|max|last)_over_time #16722
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: add ts_of_(min|max|last)_over_time #16722
Conversation
8bd9887
to
b20867d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Quick first feedback:
After some thinking, my initial hunch has solidified: The names are horrible. While it would be great to have the same name as in ViMe, I don't think I can live with the inconsistent naming here. I like your original idea timestamp_of_max_over_time
much more, but it is a bit verbose. Maybe let's do something like ts_of_max_over_time
, or max_over_time_ts
?
The ViMe names introduce a prefix that is not separated by an underscore. It also doesn't make sense as tmax_over_time
sounds like it returns the "time maximum" or "timestamp maximum" of something. But the returned timestamp is not a maximum.
Another general thing: These new functions have to be added to the frontend code, too. Please check other PRs that add new functions to see how that works, e.g. #13059
b20867d
to
cdf4772
Compare
0528945
to
fbcad9f
Compare
fbcad9f
to
8533402
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really like this idea, would be super useful for certain peak value over time range queries/dashboard panels!
But yeah, maybe some neater naming :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
8533402
to
ca3cf17
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changes on UI side looks good to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great stuff.
With @Nexucis UI check and given that this is behind the feature flag, I'll merge it now. If outrage ensues, we can just roll back. It's just an experiment.
One more thing: @MichaHoffmann could you change the commit description to match the names we have chosen in the end? |
I have already adjusted the PR title, but commit description is also important. |
This commit adds the ts_of_(max,min,last)_over_time functions behind the experimental feature flag. Signed-off-by: Michael Hoffmann <mhoffmann@cloudflare.com>
ca3cf17
to
a5fa943
Compare
done! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amazing, LGTM for the backend code. I can imagine those being super useful for detecting when certain events occurred e.g OOM or CPU spike or lost monitoring 👍
This commit adds the ts_of_(min,max,last)_over_time functions behind the
experimental-promql-functions
feature flag.Relates to #8966