Skip to main content

configure_prometheus_route

Function configure_prometheus_route 

Source
pub fn configure_prometheus_route(scope: Scope) -> Scope
Expand description

Adds a Prometheus /metrics endpoint to an Actix route scope when enabled.

Without the prometheus feature this returns the input scope unchanged. Products should call this unconditionally from their route assembly and let Cargo features decide whether the endpoint exists.