Prometheus integration for Starlette
Project description
Starlette Prometheus
:warning: This repository is a fork of the original starlette_prometheus middleware, using upgraded dependencies.
Introduction
Prometheus integration for Starlette.
Requirements
- Python 3.6+
- Starlette 0.9+
Installation
$ pip install starlette-prometheus-middleware
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
Close
Hashes for starlette-prometheus-middleware-0.9.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | c662e19b6c03b18f449ad5a3958406a9730368c6b7bae20fec13f1520046b398 |
|
MD5 | 4ddcfb05dea230af1c4034e175573773 |
|
BLAKE2b-256 | f5f1648bd46a49240125b809aac0c2fee231c6364b7f0d3cd210f0232acd33c8 |
Close
Hashes for starlette_prometheus_middleware-0.9.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4dfe23bfd6696c391c4326221f5ef8e6d2ac07b235b9fbaf6df8d86cf9261ea4 |
|
MD5 | cd2d0889c7472028fe498a3ad3adbc3e |
|
BLAKE2b-256 | d7fde7708809dfce036bdec0481ed44094366be312cc5ae3984cab04c4249151 |