Replies: 1 comment
-
|
This is the expected behavior, in Prometheus everything is handled as float64 values in the database so there is no reason to try to handle int and floats separately. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm wrapping an application's telemetry into a format suitable for prom.
I might misunderstand the documentation at https://prometheus.github.io/client_python/collector/custom
My expectation for counters is that they are ever increasing integers. The CounterMetricFamily sets float values, if you pass an integer in its constructor value kwarg.
In the example, if you register a CounterMetricsFamily, assigning an int value, the value comes back as the float value of the integer.
For example, if you set the value to 4, it gets reported as 4.0
This makes sense, since the code of the implementation is setting the value explicitly as a float in its constructor.
Is that expected?
Beta Was this translation helpful? Give feedback.
All reactions