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

Ensure metrics labels are sorted #45

Merged
merged 2 commits into from
Jul 13, 2022

Conversation

matej-g
Copy link
Contributor

@matej-g matej-g commented Jul 13, 2022

Signed-off-by: Matej Gera matejgera@gmail.com

After we started to use the write functionality with up in our system, we noticed that we started hitting issue on Thanos compactor, complaining about label set not being ordered (see prometheus/prometheus#5372 and related issues).

We should ensure that labels are sorted before we write the metrics, in line how the upstream Prometheus code inform us the order should be guaranteed upon instantiation.

Signed-off-by: Matej Gera <matejgera@gmail.com>
Copy link
Member

@bwplotka bwplotka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! 🤗

@bwplotka
Copy link
Member

Does it mean receiver does not check this? 😱

Copy link

@jessicalins jessicalins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good!
I think we can add a quick unit test to make sure?

Signed-off-by: Matej Gera <matejgera@gmail.com>
@squat
Copy link
Member

squat commented Jul 13, 2022

Nice find @matej-g

@squat squat merged commit 7f0630b into observatorium:master Jul 13, 2022
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

Successfully merging this pull request may close these issues.

4 participants