Add /health endpoint to axum server

This commit is contained in:
2026-01-13 12:05:02 +01:00
parent a1036435fe
commit 1c199bead6

View File

@@ -109,8 +109,9 @@ pub async fn start_axum_server(stop_signal: Arc<AtomicBool>) {
.with_state(start_bot_mutex) .with_state(start_bot_mutex)
.layer(prometheus_layer); .layer(prometheus_layer);
let metric_router = let metric_router = axum::Router::new()
axum::Router::new().route("/metrics", get(|| async move { metric_handle.render() })); .route("/metrics", get(|| async move { metric_handle.render() }))
.route("/health", get(|| async { StatusCode::OK }));
let router = axum::Router::new() let router = axum::Router::new()
.merge(app_router) .merge(app_router)