Prometheus metrics for bareASGI (read the docs).
Install from the pie store
$ pip install bareASGI-prometheus
The middleware can either be configured manually or with a helper.
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)
from bareasgi import Application
from bareasgi_prometheus import add_prometheus_middleware
...
app = Application()
add_prometheus_middleware(app)