I have a question relative to Gauge and booleans, if you don't mind.
I'm considering to use a gauge to reflect the evolution of a boolean value.
Knowing that the set method of a Gauge cast the given value as a float, I could call directly my_gauge.set(my_bool_value), and have it set to 0.0 or 1.0.
So the question here is: Is the casting as float part of the API design, or simply an implementation detail which may change?
If we have no guarantee that this cast will remain, then the call to set needs to be protected by my_gauge.set(float(my_bool_value)), but it is a pity to call it twice...
It's a nice built in capability, so if it is going to last, I may argue that it would be worth mentioning it explicitly somewhere, either in the doc of the
set function or the documentation of the Gauge (
https://github.com/prometheus/client_python#gauge).
Thanks in advance!