feat(om2.0): have one line for classic-native histogram#2863
Open
feat(om2.0): have one line for classic-native histogram#2863
Conversation
dashpole
reviewed
Mar 4, 2026
dashpole
reviewed
Mar 4, 2026
dashpole
reviewed
Mar 4, 2026
| foo {count:17,sum:324789.3,bucket:[0.01:0,0.1:8,1.0:11,10.0:17,+Inf:17]} st@1520430000.123 # {} 0.054 1520879607.7 # {trace_id="KOO5S4vxi0o"} 0.67 1520879602.890 # {trace_id="oHg5SJYRHA0"} 9.8 1520879607.789 | ||
| ``` | ||
|
|
||
| An example of a Histogram with Classic Buckets where the "0.01" bucket has no Exemplar. The 0.1 bucket has an Exemplar with no Labels. The 1 bucket has an Exemplar with one Label. The 10 bucket has an Exemplar with a Label and a timestamp. In practice all buckets SHOULD have the same style of Exemplars. |
Contributor
There was a problem hiding this comment.
nit: prefer keeping normative language and examples separate.
dashpole
reviewed
Mar 4, 2026
| foo {count:17,sum:324789.3,bucket:[0.01:0,0.1:8,1.0:11,10.0:17,+Inf:17]} st@1520430000.123 # {} 0.054 1520879607.7 # {trace_id="KOO5S4vxi0o"} 0.67 1520879602.890 # {trace_id="oHg5SJYRHA0"} 9.8 1520879607.789 | ||
| ``` | ||
|
|
||
| An example of a Histogram with Classic Buckets where the "0.01" bucket has no Exemplar. The 0.1 bucket has an Exemplar with no Labels. The 1 bucket has an Exemplar with one Label. The 10 bucket has an Exemplar with a Label and a timestamp. In practice all buckets SHOULD have the same style of Exemplars. |
Contributor
There was a problem hiding this comment.
Nit: prefer phrasing as "Exemplar falls within the X bucket", rather than "X bucket has exemplar"
dashpole
reviewed
Mar 4, 2026
| foo {count:17,sum:324789.3,bucket:[0.01:0,0.1:8,1.0:11,10.0:17,+Inf:17]} st@1520430000.123 # {} 0.054 1520879607.7 # {trace_id="KOO5S4vxi0o"} 1.67 1520879602.890 # {trace_id="oHg5SJYRHA0"} 9.8 1520879607.789 | ||
| ``` | ||
|
|
||
| An example of a Histogram with both Classic and Native Buckets, where the exemplars of only the Classic Buckets are |
Contributor
There was a problem hiding this comment.
This would need to be updated if we changed the wording above
krajorama
commented
Mar 5, 2026
|
|
||
| If present, the MetricPoint's Start Timestamp MUST be inlined with the Metric point with a `st@` prefix. If the value's timestamp is present, the Start Timestamp MUST be added right after it. If exemplars are present, the Start Timestamp MUST be added before it. | ||
|
|
||
| Exemplars without Labels MUST represent an empty LabelSet as {}. |
Member
Author
There was a problem hiding this comment.
Note to reviewers: let's move this to some common place.
krajorama
commented
Mar 5, 2026
| An example of Exemplars showcasing several valid cases: | ||
| The Histogram Sample with Native Buckets has multiple Exemplars. | ||
| The "0.01" bucket has no Exemplar. The 0.1 bucket has an Exemplar with no Labels. The 1 bucket has an Exemplar with one Label. The 10 bucket has an Exemplar with a Label and a timestamp. In practice all buckets SHOULD have the same style of Exemplars. | ||
| Exemplars of a MetricPoint SHOULD have the same Label names to have a consistent style. |
Member
Author
There was a problem hiding this comment.
Note to reviewers: let's move this to some common place.
dashpole
reviewed
Mar 9, 2026
Otherwise rules around label set uniqeness, timestamps are violated. Also this should be more consistent and easier on the implementation. Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
4d91df6 to
3e8e599
Compare
dashpole
approved these changes
Mar 11, 2026
bwplotka
reviewed
Mar 11, 2026
Member
bwplotka
left a comment
There was a problem hiding this comment.
Looks good, but I need to read through it again
Comment on lines
+1042
to
+1043
| After the `count` and `sum`, the remaining fields of the Native Buckets MUST be included, | ||
| then the remaining fields of the Classic Buckets (i.e. the `bucket` field) MUST be included. |
Member
There was a problem hiding this comment.
unnecessary new lines but can be removed later
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.
Otherwise rules around label set uniqeness, timestamps are violated. Also this should be more consistent and easier on the implementation.