Skip to content

feat(om2.0): have one line for classic-native histogram#2863

Merged
bwplotka merged 4 commits intomainfrom
krajo/om2-single-line
Mar 13, 2026
Merged

feat(om2.0): have one line for classic-native histogram#2863
bwplotka merged 4 commits intomainfrom
krajo/om2-single-line

Conversation

@krajorama
Copy link
Member

Otherwise rules around label set uniqeness, timestamps are violated. Also this should be more consistent and easier on the implementation.


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 {}.
Copy link
Member Author

Choose a reason for hiding this comment

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

Note to reviewers: let's move this to some common place.

Copy link
Member

Choose a reason for hiding this comment

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

noted in doc

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.
Copy link
Member Author

Choose a reason for hiding this comment

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

Note to reviewers: let's move this to some common place.

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>
Copy link
Member

@bwplotka bwplotka left a comment

Choose a reason for hiding this comment

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

Looks good, but I need to read through it again

#### Histogram with both Classic and Native Buckets

If a Histogram MetricPoint has both Classic and Native buckets, the Sample for the Native Buckets MUST come first.
The MetricPoint's value MUST be a CompositeValue.
Copy link
Member

Choose a reason for hiding this comment

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

TODO: Mention the purpose

the exposer MAY attach only one set for performance and backwards compatibility reasons, and
that set SHOULD be the exemplars associated with Classic Buckets.

If present, the MetricPoint's Start Timestamp MUST be inlined with the Metric point with a `st@` prefix.
Copy link
Member

Choose a reason for hiding this comment

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

Why we need to repeat this? Isn' this the same as everywhere else?

If a GaugeHistogram MetricPoint has both Classic and Native buckets, the Sample for the Native Buckets MUST come first.

The order ensures that implementations can easily skip the Classic Buckets if the Native Buckets are preferred.
GaugeHistogram MetricPoints with both Classic and Native Buckets follow the same syntax as Histogram MetricPoints with both Classic and Native Buckets.
Copy link
Member

Choose a reason for hiding this comment

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

TODO link

Copy link
Member

@bwplotka bwplotka left a comment

Choose a reason for hiding this comment

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

LGTM with some suggestions. I noted all as todos in our WG doc. let's merge.

@bwplotka bwplotka merged commit bf72edc into main Mar 13, 2026
6 checks passed
@bwplotka bwplotka deleted the krajo/om2-single-line branch March 13, 2026 11:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants