Prometheus integration for Starlette
Project description
Starlette Prometheus
Introduction
Prometheus integration for Starlette.
Requirements
- Python 3.6+
- Starlette 0.9+
Installation
$ pip install starlette-prometheus
Usage
A complete example that exposes prometheus metrics endpoint under /metrics/
path.
from starlette.applications import Starlette
from starlette_prometheus import metrics, PrometheusMiddleware
app = Starlette()
app.add_middleware(PrometheusMiddleware)
app.add_route("/metrics/", metrics)
Metrics for paths that do not match any Starlette route can be filtered by passing
filter_unhandled_paths=True
argument to add_middleware
method.
Contributing
This project is absolutely open to contributions so if you have a nice idea, create an issue to let the community discuss it.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
starlette-prometheus-0.7.0.tar.gz
(15.6 kB
view hashes)
Built Distribution
Close
Hashes for starlette-prometheus-0.7.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 52e51969a050b48800bf193a34b8d56f3ab114b1a754db36823003f8bcc110da |
|
MD5 | e82c218daf0b96dda88a7d13cb1af541 |
|
BLAKE2b-256 | 401e1771e752314582f8eb6d9c22ec06127244d06f7b827d50332aebc4bcf0c8 |
Close
Hashes for starlette_prometheus-0.7.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c7540074d982f4d1531cfeb996e2debea54bff76808f529377a229fb1e81e4d1 |
|
MD5 | 19cb5e644b1ddf762ec2655deb4be8a4 |
|
BLAKE2b-256 | 74720739943a74190be3ec15e26f8b468187a0255c37380167fd4f7d44521bae |