Repository navigation
Conversation
OM 1.0 required histogram and summary sums and summary quantile values to be non-negative, and required histogram counts and bucket values to be integers. Histograms with negative threshold buckets had to omit the sum. Document the OM 2.0 relaxations (negative sums and quantiles, float counts and buckets) and the unchanged rules. Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
2 tasks done
bwplotka
approved these changes
Oct 30, 2026
| temperature_celsius_bucket{le="0.0"} 5 | ||
| temperature_celsius_bucket{le="10.0"} 9 | ||
| temperature_celsius_bucket{le="+Inf"} 10 | ||
| temperature_celsius_count 10 |
Member
There was a problem hiding this comment.
In OM 1.0, _count is only exposed when _sum is present per open_metrics_spec.md#L742, so a histogram with negative threshold buckets had to omit _count too, just like in the example at line 463 above:
Suggested change
| temperature_celsius_count 10 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TL;DR: I'm not sure we need this actually. Talks about niche use cases.
Summary
Sum, negative summary quantile values, and floatCount/bucket/Gcountvalues (previously integers only).Gsum), so om2/gaugehistogram: prohibit negative count and bucket values #3139 (Gcount/bucket values must not be negative) is not misread as a delta from 1.0.Follow-up to #3139 and #3150, so the guide matches the spec before
om2-rc1goes to main.Test plan
om2-rc12.0 spec text.MD_FILES_TO_FORMAT).