File: README.md

package info (click to toggle)
prometheus-flask-exporter 0.23.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 896 kB
  • sloc: python: 2,889; sh: 709; makefile: 4
file content (14 lines) | stat: -rw-r--r-- 758 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# Gunicorn example

This [Gunicorn](https://gunicorn.org/) example has a sample app in [server.py](server.py) with
multiprocessing enabled for metrics collection.
In practise, this means the individual forks metrics
will be combined, and the metrics endpoint from any of them
should include the global stats.

This example exposes the metrics on an individual endpoint, managed by [prometheus_client](https://github.com/prometheus/client_python#multiprocess-mode-gunicorn), started only on the master process, configured in the [config.py](config.py) file.

## Thanks

Huge thanks for [@Miouge1](https://github.com/Miouge1) for
bringing this to my attention in [prometheus_flask_exporter#15](https://github.com/rycus86/prometheus_flask_exporter/issues/15) !