Skip to content

Commit

Permalink
refactor: bind Prometheus listener to dynamic address
Browse files Browse the repository at this point in the history
  • Loading branch information
luis-herasme committed Aug 16, 2024
1 parent 1445145 commit dfd8bb8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ghost-crab/src/logs/prometheus.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ impl Prometheus {

tokio::spawn(async move {
let app = Router::new().route("/metrics", get(metrics_handler)).with_state(state);
let listener = tokio::net::TcpListener::bind("0.0.0.0:3000").await.unwrap();
let listener = tokio::net::TcpListener::bind(address.as_str()).await.unwrap();
println!("Metrics server listening on {:?}", listener);
axum::serve(listener, app).await.unwrap();
});
Expand Down

0 comments on commit dfd8bb8

Please sign in to comment.