rycus86 / prometheus_flask_exporter

Prometheus exporter for Flask applications
https://pypi.python.org/pypi/prometheus-flask-exporter
MIT License
636 stars 162 forks source link

General: metrics for arbitrary values (not requests) #114

Open lakay opened 2 years ago

lakay commented 2 years ago

General Question

can you give some pointers if it is possible to use the module to expose metrics related not to request tracking? My goal is to write a prom exporter to provide application probe value monitoring received via kafka or tibcorv.

rycus86 commented 2 years ago

Yep, it is totally possible. You can either use the helper methods on the PrometheusMetrics instance (like counter, summary, etc) or import the relevant metric types from the underlying prometheus_client library and they will all be collected together with the HTTP metrics. (if you only need metrics for kafka and similar but not for HTTP/Flask, then I'd just use that underlying library - not sure how your app looks like)

Does this help?

lakay commented 2 years ago

Thank you so much for your fast reply. I am going for the prometheus_client module in the first PoC. Might be very interesting to combine it later on with HTTP Metrics.

Great Help, thank you!