Basically I need to do a set() since I am relaying counter stats from a source to Prometheus and it appears a LOT of hoop jumping is required. Further, I only found working GOLANG examples or documented GOLANG examples. The docs in Python speak to the topic but don't actually use the APIs and show how it is done.
Does anyone know if this actually works or has an example?
The only reference I could find with Python code was in the test scripts using CollectorRegistry, which I cannot find good docs on and it seems used only in testing. This seems to be a lot of obfuscation and extra overhead in order to remain religious on "only incrementing a counter." Counters for Exporters will almost always need to be set. Wouldn't an alternative API be better or a good Python example (assuming the overhead remains within reason.)
Oh wait, does add_metric actually replace the metric rather than increment? The blurb https://github.com/prometheus/client_python especially using the small values in the example implied to me it was incrementing rather than setting.
I think that was it. If the readme could spell that out better, that would be great. The small values and different approach with Gauge in the example for me seemed to imply that the add_metric was the same as inc() rather than the equivalent of set()