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

Emit a warning when sort is used for range queries #14115

Open
charleskorn opened this issue May 17, 2024 · 1 comment
Open

Emit a warning when sort is used for range queries #14115

charleskorn opened this issue May 17, 2024 · 1 comment

Comments

@charleskorn
Copy link
Contributor

Proposal

Using sort with range queries will not work: the series in a range query result will always be sorted by the series labels.

This may be confusing for users. It would be nice to emit a warning annotation when sort is used for a range query to explain what is happening.

(acknowledgement: this is @bboreham's idea from #14083 (comment))

@bboreham
Copy link
Member

It can be expensive on CPU to sort at every step of a range-query; we could save that overhead.

sort_by_label could work for range queries, but Prometheus currently overrides that too.

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

2 participants