Open gautierrog opened 8 months ago
Hey,
This library is intended to use with Flask as it provides convenient wrappers for its HTTP handler functions. Underneath, it uses https://github.com/prometheus/client_python and all metrics exposed through that to the same registry will also show up on the metrics endpoint. Depending on your use-case, perhaps you'd just need the underlying library only and use its exposition options to expose them to your scraper? If not, perhaps a minimal example would help figuring out what options you have.
How does this lib work outside of flask http requests?
To answer this more directly, using metrics (counters, summary, etc.) from the underlying Prometheus library will all show up together with the Flask specific metrics, as long as they all use the same Prometheus registry. (there's a default one unless overridden)
Hope this helps?
Hello,
I try to use the lib within a celery worker. I used a multiprocess metric and called
metrics.start_http_server
but the metrics I setup are never updated.How does this lib work outside of flask http requests?