Skip to content

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

Open
krajorama wants to merge 2 commits intomainfrom
krajo/om2-single-line
Open

feat(om2.0): have one line for classic-native histogram#2863
krajorama wants to merge 2 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.

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>
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.
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: prefer keeping normative language and examples separate.

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.
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: prefer phrasing as "Exemplar falls within the X bucket", rather than "X bucket has exemplar"

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

Choose a reason for hiding this comment

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

This would need to be updated if we changed the wording above

Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>

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.

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.


Exemplars MAY be attached to the Histogram MetricPoint.

When present, all Exemplars of the Histogram MetricPoint SHOULD be attached.
Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure I understand this sentence. It sounds like it means "you should attach all exemplars you have for a histogram regardless of whether they are associated with classic or native buckets", but that clearly isn't what you mean below.

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.

2 participants