Skip to content

Don't interleave histogram metrics in multi-process collector - #1148

Merged
csmarchbanks merged 1 commit into
prometheus:masterfrom
cjwatson:interleaved-multiprocess-histogram-metrics
Nov 26, 2025
Merged

Don't interleave histogram metrics in multi-process collector#1148
csmarchbanks merged 1 commit into
prometheus:masterfrom
cjwatson:interleaved-multiprocess-histogram-metrics

Conversation

@cjwatson

Copy link
Copy Markdown
Contributor

The OpenMetrics exposition format requires that samples for a given Metric (i.e. metric name and label set) are not interleaved, but the way that the multi-process collector handled accumulating histogram metrics could end up interleaving them. Restructure it slightly to guarantee that all the samples for a given Metric are kept together.

Fixes: #1147

The OpenMetrics exposition format requires that samples for a given
Metric (i.e. metric name and label set) are not interleaved, but the way
that the multi-process collector handled accumulating histogram metrics
could end up interleaving them.  Restructure it slightly to guarantee
that all the samples for a given Metric are kept together.

Fixes: prometheus#1147

Signed-off-by: Colin Watson <cjwatson@debian.org>

@csmarchbanks csmarchbanks left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks!

@csmarchbanks
csmarchbanks merged commit a264ec0 into prometheus:master Nov 26, 2025
12 checks passed
@cjwatson
cjwatson deleted the interleaved-multiprocess-histogram-metrics branch January 15, 2026 11:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants