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.8.0.tar.gz
(15.8 kB
view hashes)
Built Distribution
Close
Hashes for starlette-prometheus-0.8.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 46b6a7090d0b43e1d5706c147cea3b27bf0e72ac8bb4677ff39f495f2849fa30 |
|
MD5 | 2c834cc24c0007253b3d9b900362c4e8 |
|
BLAKE2b-256 | adf1af6ab8d9fd5a7ecac5e7dcd00c8ca4c03ca7326bb18d253b80c2327af269 |
Close
Hashes for starlette_prometheus-0.8.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 740ba70a7711d63b10f44f5ea1a041f4c325241e707ed87064408b8b6841c010 |
|
MD5 | d598e4e04b5d7f74cd724e71619312fe |
|
BLAKE2b-256 | ec667d52224ef52a92fd869a26a9e709f39c26e69cda30c8e85efaae50924909 |