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.
This commit is contained in:
Arpad Müller
2025-04-03 13:58:12 +02:00
committed by GitHub
parent 5e507776bc
commit 374736a4de

View File

@@ -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:#}");
}
}
}