From 980fb67f6c113056e14f221e0275d210bed55f26 Mon Sep 17 00:00:00 2001 From: Brian Martin Date: Wed, 23 Oct 2024 13:06:27 -0700 Subject: [PATCH] fix: listen address config ignored The metrics listener address mistakenly ignored the configured listen address. Changes the listener initialization to use the configured value. --- src/exposition/http/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/exposition/http/mod.rs b/src/exposition/http/mod.rs index 8c3fc7f8..40059573 100644 --- a/src/exposition/http/mod.rs +++ b/src/exposition/http/mod.rs @@ -19,11 +19,11 @@ struct AppState { } pub async fn serve(config: Arc, samplers: Arc]>>) { - let state = Arc::new(AppState { config, samplers }); + let state = Arc::new(AppState { config: config.clone(), samplers }); let app: Router = app(state); - let listener = TcpListener::bind("0.0.0.0:4242") + let listener = TcpListener::bind(config.general().listen()) .await .expect("failed to listen");