Skip to content

bugfix sort after merging histogram metrics#7380

Open
Shvejan wants to merge 1 commit intocortexproject:masterfrom
Shvejan:master
Open

bugfix sort after merging histogram metrics#7380
Shvejan wants to merge 1 commit intocortexproject:masterfrom
Shvejan:master

Conversation

@Shvejan
Copy link
Contributor

@Shvejan Shvejan commented Mar 26, 2026

What this PR does:
Add sort.Slice() to sort buckets by UpperBound in ascending order after building from the map. This matches the Prometheus client library's approach:

Which issue(s) this PR fixes:
Fixes #7379

Checklist

  • Tests updated
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [BUGFIX]

Signed-off-by: Shvejan Mutheboyina <shvejan@amazon.com>
Copy link
Contributor

@yeya24 yeya24 left a comment

Choose a reason for hiding this comment

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

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: mergeHistogram produces non-deterministic bucket order causing flaky tests

2 participants