Prometheus integration for Starlette
Project description
Starlette Prometheus
Introduction
Prometheus integration for Starlette.
Requirements
- Python 3.8+
- Starlette 0.12+
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. Note that not
turning on this filtering can lead to unbounded memory use when lots of different
routes are called.
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
Built Distribution
Close
Hashes for starlette_prometheus-0.10.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 77d1e9cfad572206e8de242975bd00a62e33685eb330389f2add04e4d719d47d |
|
MD5 | 497a9a3fdc1f1abcc3065e98ad592d6a |
|
BLAKE2b-256 | 89f203fc6b3c10fb436c81ee567ac46c49418819d6901101ece7bd45be465162 |
Close
Hashes for starlette_prometheus-0.10.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8b2f997495f809f01387378dad5476b2a1cf2fb2d9b96164394effdecb2d8380 |
|
MD5 | fde9c2d9de4f169bb692befc450f38ad |
|
BLAKE2b-256 | 1040244a5eba1a1d0393b9eea768afee74ab8e0d7d0e99299edbcafe22ef65f7 |