From 374736a4deed9531a8a2a45fcf8fc451c4967a71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arpad=20M=C3=BCller?= Date: Thu, 3 Apr 2025 13:58:12 +0200 Subject: [PATCH] Print remote_addr span for Failed to serve HTTP connection error (#11423) I've encountered this error in #11422. Ideally we'd have the URL as well to associate it with a tenant, but at this level we only have the remote addr I guess. Better than nothing. --- libs/http-utils/src/server.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libs/http-utils/src/server.rs b/libs/http-utils/src/server.rs index 33e4915e99..07fd56ac01 100644 --- a/libs/http-utils/src/server.rs +++ b/libs/http-utils/src/server.rs @@ -91,14 +91,14 @@ impl Server { Ok(tls_stream) => tls_stream, Err(err) => { if !suppress_io_error(&err) { - info!("Failed to accept TLS connection: {err:#}"); + info!(%remote_addr, "Failed to accept TLS connection: {err:#}"); } return; } }; if let Err(err) = Self::serve_connection(tls_stream, service, cancel).await { if !suppress_hyper_error(&err) { - info!("Failed to serve HTTPS connection: {err:#}"); + info!(%remote_addr, "Failed to serve HTTPS connection: {err:#}"); } } } @@ -106,7 +106,7 @@ impl Server { // Handle HTTP connection. if let Err(err) = Self::serve_connection(tcp_stream, service, cancel).await { if !suppress_hyper_error(&err) { - info!("Failed to serve HTTP connection: {err:#}"); + info!(%remote_addr, "Failed to serve HTTP connection: {err:#}"); } } }