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
File details
Details for the file starlette-prometheus-middleware-0.9.0.tar.gz
.
File metadata
- Download URL: starlette-prometheus-middleware-0.9.0.tar.gz
- Upload date:
- Size: 15.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.4 CPython/3.8.7 Linux/5.4.0-1036-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c662e19b6c03b18f449ad5a3958406a9730368c6b7bae20fec13f1520046b398 |
|
MD5 | 4ddcfb05dea230af1c4034e175573773 |
|
BLAKE2b-256 | f5f1648bd46a49240125b809aac0c2fee231c6364b7f0d3cd210f0232acd33c8 |
File details
Details for the file starlette_prometheus_middleware-0.9.0-py3-none-any.whl
.
File metadata
- Download URL: starlette_prometheus_middleware-0.9.0-py3-none-any.whl
- Upload date:
- Size: 16.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.4 CPython/3.8.7 Linux/5.4.0-1036-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4dfe23bfd6696c391c4326221f5ef8e6d2ac07b235b9fbaf6df8d86cf9261ea4 |
|
MD5 | cd2d0889c7472028fe498a3ad3adbc3e |
|
BLAKE2b-256 | d7fde7708809dfce036bdec0481ed44094366be312cc5ae3984cab04c4249151 |