Skip to content

No metrics being captured for factory GunicornInternalPrometheusMetrics #4976

@geek876

Description

@geek876

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions