Create the metrics router for the dedicated metrics port.
(handle: PrometheusHandle)
| 168 | |
| 169 | /// Create the metrics router for the dedicated metrics port. |
| 170 | pub fn metrics_router(handle: PrometheusHandle) -> Router { |
| 171 | Router::new() |
| 172 | .route("/metrics", get(render_metrics)) |
| 173 | .with_state(handle) |
| 174 | } |
| 175 | |
| 176 | async fn render_metrics(State(handle): State<PrometheusHandle>) -> impl IntoResponse { |
| 177 | handle.render() |
no test coverage detected