Skip to main content

Prometheus metrics for bareASGI

Project description

bareASGI-prometheus

Prometheus metrics for bareASGI

Installation

Install from the pie store

$ pip install bareASGI-prometheus

Usage

The middleware can either be configured manually or with a helper.

Manual Configuration

from bareasgi import Application
from bareasgi_prometheus import PrometheusMiddleware, prometheus_view

...

prometheus_middleware = PrometheusMiddleware()
app = Application(middlewares=[prometheus_middleware])
app.http_router.add({'GET'}, '/metrics', prometheus_view)

Helper Configuration

from bareasgi import Application
from bareasgi_prometheus import add_prometheus_middleware

...

app = Application()
add_prometheus_middleware(app)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for bareasgi-prometheus, version 3.6.0
Filename, size File type Python version Upload date Hashes
Filename, size bareASGI_prometheus-3.6.0-py3-none-any.whl (9.2 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size bareASGI-prometheus-3.6.0.tar.gz (7.5 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page