-
Notifications
You must be signed in to change notification settings - Fork 1.1k
feat(om2): add native histograms to OpenMetrics2.0 #2634
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: György Krajcsovits <[email protected]>
Signed-off-by: György Krajcsovits <[email protected]>
Signed-off-by: György Krajcsovits <[email protected]>
Signed-off-by: György Krajcsovits <[email protected]>
|
||
Numbers MUST be either floating points or integers. Note that ingestors of the format MAY only support float64. The non-real values NaN, +Inf and -Inf MUST be supported. NaN MUST NOT be considered a missing value, but it MAY be used to signal a division by zero. | ||
|
||
Complex data types MUST contain all information necessary to recreate a Metric Type, with the exception of Created time and Exemplars. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This assume we'll have the created timestamp separate from the JSON like data. prometheus/OpenMetrics#285
Signed-off-by: György Krajcsovits <[email protected]>
Note self: add details how summaries and classic histograms one liners (so not NHCB spans/deltas) fit into it. |
Signed-off-by: György Krajcsovits <[email protected]>
Signed-off-by: György Krajcsovits <[email protected]>
Add semantic conventions about where complex types may occure. Allow empty spans and deltas. Be more precise. Signed-off-by: György Krajcsovits <[email protected]>
Signed-off-by: György Krajcsovits <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Had some minutes to read the PR. Couldn't read everything though, I'll do a more complete review another day!
Reviewed from mobile
Signed-off-by: György Krajcsovits <[email protected]>
Signed-off-by: György Krajcsovits <[email protected]>
This comment was marked as outdated.
This comment was marked as outdated.
I did not want to clutter the examples with adding "# EOF" to all, so I made a new marker to explicitly add it on request. There was only one faulty example where we had an extra space, see the Exemplars section. Signed-off-by: György Krajcsovits <[email protected]>
Allow multiple exemplars for complex types, i.e. native histograms. But require that the timestamp is present. Signed-off-by: György Krajcsovits <[email protected]>
c16426b
to
7965787
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for doing all of this.
Mostly commented about the histogram aspect (but I couldn't resist and referred to OM specific things now and then).
Signed-off-by: György Krajcsovits <[email protected]>
Signed-off-by: György Krajcsovits <[email protected]>
Signed-off-by: György Krajcsovits <[email protected]>
even unpopulated ones. Signed-off-by: György Krajcsovits <[email protected]>
Empty may be exposed for optimizing spans. Signed-off-by: György Krajcsovits <[email protected]>
Signed-off-by: György Krajcsovits <[email protected]>
Signed-off-by: György Krajcsovits <[email protected]>
Rename negative_deltas and positive_deltas to negative_buckets and positive_buckets. Distinguish integer and float histograms by the number format used in them. If the number has dot "." or exponent "e", then the number is a float. Otherwise integer. Signed-off-by: György Krajcsovits <[email protected]>
The timestamp requirement came from current limitations in Prometheus exemplar storage. However in the future this might be solved. Also there's the case when a classic histogram exposes exemplars. Signed-off-by: György Krajcsovits <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some more comments.
Sorry for adding some comments outside of a review.
I also assume that non-outdated non-resolved comments are still on your radar to deal with later.
Signed-off-by: György Krajcsovits <[email protected]>
Signed-off-by: György Krajcsovits <[email protected]>
Signed-off-by: György Krajcsovits <[email protected]>
Signed-off-by: György Krajcsovits <[email protected]>
Sync with the spec https://prometheus.io/docs/specs/native_histograms/#zero-bucket Signed-off-by: György Krajcsovits <[email protected]>
Signed-off-by: György Krajcsovits <[email protected]>
Allow missing _sum and _count and set rules for interpretation if needed. Signed-off-by: György Krajcsovits <[email protected]>
To reduce scope. Signed-off-by: György Krajcsovits <[email protected]>
Just one more note from my side. (But as said, I'm not authorized to approve OMv2 related things.) |
I'm planning to go through this, but looks generally good! |
Signed-off-by: György Krajcsovits <[email protected]>
Signed-off-by: György Krajcsovits <[email protected]>
My comments have all been addressed. (I just don't approve this for the reasons stated previously.) |
Signed-off-by: György Krajcsovits <[email protected]>
Background
Based on https://github.com/prometheus/proposals/blob/main/proposals/2024-01-29_native_histograms_text_format.md
And OpenMetrics 2.0 WG discussions.
Changes
Require that exemplars for complex type values have the timestamp.(1)Be permissive about the existence of _sum and _count series for classic histograms - for backwards compatibility.(1) Not doing this on account of being an implementation limitation and also contradicts having backwards compatibility when exposing classic histograms as complex type.
Open questions / decisions
See OpenMetrics2.0 WG meeting notes tab