Skip to main content

Module metrics

Module metrics 

Source
Expand description

Prometheus metrics — install once, record per-request RED metrics.

Call init_metrics() from ArclyObservabilityPlugin::on_init. The returned PrometheusHandle is provided into the DI container so the /metrics route handler can call handle.render() to produce the scrape body.

Functions§

init_metrics
Install the Prometheus metrics recorder globally and return a render handle.
metrics_route_handler
Build the axum route handler for GET /metrics.
record_request
Record one completed HTTP request into the global metrics recorder.