-
Notifications
You must be signed in to change notification settings - Fork 609
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
Sort labelset to ensure compatibility with thanos-receive #2784
Conversation
@fstolba You need to sign the CLA in order to have your changes integrated |
Hello guys, i also faced this issue and confirm that the commit proposed by @fstolba fixes this timeseries error ! |
Sorry for the delay, CLA is now signed. |
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.
I think this can happen not only for Thanos but also for every Prometheus-like backend. Maybe it's worth having a comment and a simple test to prevent someone from removing that. prometheus/prometheus#11505
Could you please add changelog and fix lint?
@fstolba Have you looked into adding a test (or an assert to an existing one) to check that the labels are sorted? |
I tested the solution proposed in #2784 with my thanos receiver, and it works for me. I print the labels and the order is correct. |
Please add a CHANGELOG entry. |
We're using thanos-receive which requires labels to be sorted lexicographically. Trying to submit a metric without first sorting the label list results in the write request being rejected, yielding the message
Out of order labels in the label set
.This PR fixes this behaviour.
Please note I only tested this on thanos-remote, could use testing on other implementations.