Skip to content
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

Are buckets optional in OTLP Exponential Histograms? #3848

Open
mx-psi opened this issue Jan 29, 2024 · 3 comments
Open

Are buckets optional in OTLP Exponential Histograms? #3848

mx-psi opened this issue Jan 29, 2024 · 3 comments
Labels
spec:metrics Related to the specification/metrics directory triage:accepted:needs-sponsor Ready to be implemented, but does not yet have a specification sponsor

Comments

@mx-psi
Copy link
Member

mx-psi commented Jan 29, 2024

What are you trying to achieve?

As a vendor consuming OTLP data, we want to understand what kind of OTLP Exponential Histograms are aligned with the specification.

What did you expect to see?

OTLP Histogram buckets are optional according to the latest specification. The proto definition for OTLP Exponential Histograms allows sending an exponential histogram without buckets, but this is not explicitly mentioned in the data model document.

I would like the data model to explicitly mention if buckets are optional for exponential histograms.

@mx-psi mx-psi added the spec:metrics Related to the specification/metrics directory label Jan 29, 2024
@jack-berg
Copy link
Member

I think as a vendor you should be prepared to accept exponential histograms without buckets. Consider negative buckets: these are only possible to produce outside of an SDK, since the metrics histogram API / SDK currently does not accept negative values. I would expect that some SDK implementations omit the negative bucket field rather than include an empty version

With that said, the java implementation does serialize an empty value for the negative buckets, rather than omitting it.

@arminru arminru added the [label deprecated] triaged-accepted [label deprecated] Issue triaged and accepted by OTel community, can proceed with creating a PR label Feb 7, 2024
@jsuereth
Copy link
Contributor

jsuereth commented Feb 7, 2024

I think we should clarify this in the specification.

Given we're moving from Explicit Bucket => Exponential histograms, we think it is reasonable that users would ALSO be able to configure Exponential histograms with 0 buckets the way they do Explicit buckets today. In this case the user is looking for a "cheaper" summary of min/max/count/sum.

Specifically, if we look at the specification for configuring these, we do allow user to set MaxSize to 0.

@jack-berg
Copy link
Member

Specifically, if we look at the specification for configuring these, we do allow user to set MaxSize to 0.

Where do you see that? We actually just recently fixed a bug in java which was caused by setting the number of buckets to 1: open-telemetry/opentelemetry-java#6089.

We might consider clarifying the spec to say that exponential buckets MaxSize is > 1, and that you a single bucket explicit bucket histogram is the mechanism you should use for producing a summary (min, max, count, sum).

@austinlparker austinlparker added triage:accepted:needs-sponsor Ready to be implemented, but does not yet have a specification sponsor and removed [label deprecated] triaged-accepted [label deprecated] Issue triaged and accepted by OTel community, can proceed with creating a PR labels Apr 30, 2024
@austinlparker austinlparker moved this to Spec - Accepted in 🔭 Main Backlog Jul 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
spec:metrics Related to the specification/metrics directory triage:accepted:needs-sponsor Ready to be implemented, but does not yet have a specification sponsor
Projects
Status: Spec - Accepted
Development

No branches or pull requests

6 participants