Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No metrics being captured for factory GunicornInternalPrometheusMetrics #4976

Open
geek876 opened this issue Oct 7, 2024 · 0 comments
Open

Comments

@geek876
Copy link

geek876 commented Oct 7, 2024

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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant