Skip to content

Call out the behavior of Inf and NaN values for the metrics API #1936

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

Closed
jmacd opened this issue Sep 17, 2021 · 0 comments · Fixed by #2007
Closed

Call out the behavior of Inf and NaN values for the metrics API #1936

jmacd opened this issue Sep 17, 2021 · 0 comments · Fixed by #2007
Assignees
Labels
spec:metrics Related to the specification/metrics directory

Comments

@jmacd
Copy link
Contributor

jmacd commented Sep 17, 2021

What are you trying to achieve?

What should happen when a user passes Inf and NaN values to the API? Does it depend on which kind of instrument you're using?

Prometheus allows NaN values, but being "not a number" qualifies them, in my opinion, to be excluded. Infinite values are problematic for different reasons. Gauges might allow any of these, but Counters and Histograms can't work with either.

Additional context.

#1933 (comment)

@jmacd jmacd added the spec:metrics Related to the specification/metrics directory label Sep 17, 2021
@jsuereth jsuereth assigned jmacd and unassigned jmacd Sep 21, 2021
@reyang reyang added this to the Metrics API/SDK Feature Freeze milestone Sep 21, 2021
@reyang reyang assigned reyang and unassigned jsuereth Oct 7, 2021
schmikei pushed a commit to schmikei/opentelemetry-specification that referenced this issue Apr 17, 2025
…n /internal/tools (open-telemetry#1936)

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
schmikei pushed a commit to schmikei/opentelemetry-specification that referenced this issue Apr 17, 2025
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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants