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
Built Distribution
File details
Details for the file starlette-prometheus-0.8.0.tar.gz
.
File metadata
- Download URL: starlette-prometheus-0.8.0.tar.gz
- Upload date:
- Size: 15.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.0.5 CPython/3.8.2 Linux/5.8.0-1039-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 46b6a7090d0b43e1d5706c147cea3b27bf0e72ac8bb4677ff39f495f2849fa30 |
|
MD5 | 2c834cc24c0007253b3d9b900362c4e8 |
|
BLAKE2b-256 | adf1af6ab8d9fd5a7ecac5e7dcd00c8ca4c03ca7326bb18d253b80c2327af269 |
File details
Details for the file starlette_prometheus-0.8.0-py3-none-any.whl
.
File metadata
- Download URL: starlette_prometheus-0.8.0-py3-none-any.whl
- Upload date:
- Size: 16.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.0.5 CPython/3.8.2 Linux/5.8.0-1039-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 740ba70a7711d63b10f44f5ea1a041f4c325241e707ed87064408b8b6841c010 |
|
MD5 | d598e4e04b5d7f74cd724e71619312fe |
|
BLAKE2b-256 | ec667d52224ef52a92fd869a26a9e709f39c26e69cda30c8e85efaae50924909 |