-
Notifications
You must be signed in to change notification settings - Fork 893
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
Add optional Zero Threshold for Exponential Histograms to the metrics data model #2665
Conversation
dbb4cff
to
f436101
Compare
This is a field that exists and is used in Prometheus Exponential Histograms and it would be nice to include it in OTel Exponential Histograms as well. You can see the reference implementation here: https://github.com/prometheus/prometheus/blob/5937b4f5d4f658758f4aa6b9ab803f022e6e5497/model/histogram/float_histogram.go#L186-L197 https://github.com/prometheus/prometheus/blob/5937b4f5d4f658758f4aa6b9ab803f022e6e5497/model/histogram/float_histogram.go#L770-L790 Signed-off-by: Goutham Veeramachaneni <[email protected]>
f436101
to
e5565b7
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.
Assuming this supports Prometheus compatibility (and I'd love to have a more official specification to ensure that), this looks good to me as an optional extension.
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.
I think this is really important to avoid the "taint mode" 👍
Signed-off-by: Goutham Veeramachaneni <[email protected]>
@gouthamve I changed the PR title to limit its scope to match what's currently reviewed. I think after this merges, we're free to add it in the protocol for OTLP v0.20. Separately, we'll update ./sdk.md to say that expo-histos will accept an option and will have a default behavior w.r.t. this new thing--this we can debate later. |
This is a follow up of #2611 and the Prometheus WG call from June 22, 2022.
Changes
This discusses the
zero_threshold
field that exists and is used in Prometheus Exponential Histograms and it would be nice to include it in OTel Exponential Histograms as well.You can see the reference implementation here:
https://github.com/prometheus/prometheus/blob/5937b4f5d4f658758f4aa6b9ab803f022e6e5497/model/histogram/float_histogram.go#L186-L197
https://github.com/prometheus/prometheus/blob/5937b4f5d4f658758f4aa6b9ab803f022e6e5497/model/histogram/float_histogram.go#L770-L790
Prometheus also uses it (increases
zero_threshold
) to limit the number of buckets: https://github.com/prometheus/client_golang/blob/5a321c7b05264e54d2dbc86f12d9b80d4e7a492b/prometheus/histogram.go#L773-L808DDSketch from Datadog uses something similar to limit the number of buckets (they expand the lowest bucket, not zero bucket but same principle).
Related issues #2611