Fix histogram race condition causing non-cumulative bucket counts

Fixes scrape errors: "count is not cumulative: N < M"

  • Update buckets in descending order so concurrent reads always see valid cumulative ordering. Treat "torn" reads as an acceptable tradeoff since no locking is required.
  • Share bucket orderings across label sets to reduce allocations and repeated reverse calls.

Merge request reports

Loading
Loading