Closed
Description
When a NaN
value is observed, the current implementation of histogram increases count
and sets sum
to NaN
.
This violates two parts of the OpenMetrics spec:
- Sum MUST NOT be NaN.
- Count must be equal to the +Inf bucket.
This means NaN
values must be ignored according to OpenMetrics.
I think ignoring NaN
observations is a good idea, because then the count can be calculated from the bucket values. I'm doing this in client_java
's new data model, and I like it because the derived count can never become inconsistent.
Anyway, it would be good if all Prometheus client libraries behaved the same, so what do you think of ignoring NaN
observations?
Metadata
Metadata
Assignees
Labels
No labels