This section contains a sample of using Prometheus to instrument a Flask application to emit Service Level Indicator metrics.
-
Many samples require extra libraries to be installed. If there is a
requirements.txt
, you will need to install the dependencies withpip
.pip install -t lib -r requirements.txt
-
Use
main.py
to run the sample:python main.py
-
Visit
http://localhost:8080
to view your application. -
Visit
http://localhost:8080/metrics
to view your metrics.
For more information on Prometheus: