Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

An example of Prometheus instrumentation with Flask and Python

License

Notifications You must be signed in to change notification settings

philwinder/prometheus-python

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Example Prometheus Instrumentation for Python

This is a quick example of how to instrument your Flask-based Python app with the Python Prometheus client.

This project is built with:

  • Python 3.6.x

And is packaged as a Docker container. The two top level dependencies are:

  • Flask==0.12.2
  • prometheus-client==0.0.21

See the requirements file for more details.

Prometheus

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.

Building

This project is automatically built by Docker Automated Builds.

To build manually:

docker build -t python-app .

Running

Simply open port 5000 when running as a container:

docker run -p 5000:5000 --name python-app philwinder/prometheus-python

About

An example of Prometheus instrumentation with Flask and Python

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.