Skip to main content

handle_prometheus

Function handle_prometheus 

Source
pub async fn handle_prometheus(
    registry: &MetricsRegistry,
    headers: HeaderMap,
) -> Result<Response, (StatusCode, String)>
Expand description

Serves metrics from the selected metrics registry variant.

If the caller’s Accept header advertises support for the Prometheus protobuf format (application/vnd.google.protobuf), the response is a length-delimited stream of io.prometheus.client.MetricFamily messages. Otherwise the standard Prometheus text format is returned.