An example of Prometheus instrumentation with Flask and Python, wrapped in a Docker container.
3.8K
This is a quick example of how to instrument your Flask-based Python app with the Python Prometheus client.
This project is built with:
And is packaged as a Docker container. The two top level dependencies are:
See the requirements file for more details.
Prometheus is a Cloud Native monitoring application.
To instrument our Python code we need to manipulate the metrics each time a new HTTP request is received.
See the application for more details.
This project is automatically built by Docker Automated Builds.
To build manually:
docker build -t python-app .
Simply open port 5000 when running as a container:
docker run -p 5000:5000 --name python-app philwinder/prometheus-python
Content type
Image
Digest
Size
32.3 MB
Last updated
almost 9 years ago
docker pull philwinder/prometheus-python