flask-prometheus
flask-prometheus copied to clipboard
Running app with Gunicorn
When running a flask app with Gunicorn the metrics monitoring doesn't work, do you plan to setup a multithreading capability for multiple workers?
django-prometheus
implemented a strategy where if you have multiple workers, the HTTP server for metric will be attempted to be started on a range of ports. Perhaps that's an idea?
@dmartincc You can set a prometheus_multiproc_dir
environment variable, so that prometheus will handle multiprocess by itself. It is undocumented feature. Note that you must create that directory yourself before any of the metrics will be collected.
See https://github.com/prometheus/client_python/blob/master/prometheus_client/core.py#L461
您好,您的邮件已收到,谢谢!