Skip to main content

Prometheus metrics for bareASGI

Project description

bareASGI-prometheus

Prometheus metrics for bareASGI (read the docs).

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.

Source Distribution

bareASGI-prometheus-4.2.0.tar.gz (7.7 kB view hashes)

Uploaded Source

Built Distribution

bareASGI_prometheus-4.2.0-py3-none-any.whl (9.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page