You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to create an exponential histogram containing negative values.
When I do so, I get [Record amount must be non-negative on Histogram](https://github.com/open-telemetry/opentelemetry-python/blob/8378db984edbc2a0532c5316e82df1ac649ba227/opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/instrument.py#L206) -- but as far as I can tell, the spec permits negative values on histograms and explicitly calls out negative value support for Exponential ones (the datatype even includes a collection of buckets called "Negative").
A search of issues and PRs didn't turn up a reason this was excluded. Is there one?
(I've now checked this with .NET and JS, and both of them also exclude negative values. I'm guessing this was added to the spec recently.)
The text was updated successfully, but these errors were encountered:
The value is expected to be non-negative. This API SHOULD be documented in a way to communicate to users that this value is expected to be non-negative. This API SHOULD NOT validate this value, that is left to implementations of the API.
the SDK is an implementation of the API so emits this warning. I couldn't find an issue for this exactly but some related discussion in open-telemetry/opentelemetry-specification#2757. I'd recommend opening a spec issue about this.
I am trying to create an exponential histogram containing negative values.
When I do so, I get
[Record amount must be non-negative on Histogram](https://github.com/open-telemetry/opentelemetry-python/blob/8378db984edbc2a0532c5316e82df1ac649ba227/opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/instrument.py#L206)
-- but as far as I can tell, the spec permits negative values on histograms and explicitly calls out negative value support for Exponential ones (the datatype even includes a collection of buckets called "Negative").A search of issues and PRs didn't turn up a reason this was excluded. Is there one?
(I've now checked this with .NET and JS, and both of them also exclude negative values. I'm guessing this was added to the spec recently.)
The text was updated successfully, but these errors were encountered: