wowlab_sentinel/http/routes/metrics.rs
1use std::sync::Arc;
2
3use axum::{extract::State, http::header, response::IntoResponse};
4
5use crate::state::ServerState;
6
7pub(super) async fn handler(State(state): State<Arc<ServerState>>) -> impl IntoResponse {
8 (
9 [(header::CONTENT_TYPE, "text/plain; version=0.0.4")],
10 state.health.prometheus.render(),
11 )
12}