lemur icon indicating copy to clipboard operation
lemur copied to clipboard

No metrics being captured for `factory` `GunicornInternalPrometheusMetrics`

Open geek876 opened this issue 4 months ago • 0 comments

I tried the factory example for my flask app

   from prometheus_flask_exporter.multiprocess import GunicornInternalPrometheusMetrics

    metric_sender = GunicornInternalPrometheusMetrics.for_app_factory()
    metric_sender.init_app(app)

However, when i check the metrics endpoint , i only get this output. No, metrics being captured ?

sh-5.1$ curl http://localhost:8000/metrics
# HELP flask_exporter_info Information about the Prometheus Flask exporter
# TYPE flask_exporter_info gauge
flask_exporter_info{version="0.23.1"} 1.0

I also tried adding in the config file, not sure if that is absolutely needed for the base metrices to work regardless

def child_exit(server, worker):
    GunicornInternalPrometheusMetrics.mark_process_dead_on_child_exit(worker.pid)

geek876 avatar Oct 07 '24 20:10 geek876