Suppress log noise from /metrics and /health endpoints [#1292]. Change log level for 'netapp: incomming connection ...' message [#1310] (#1361)

Reviewed-on: https://git.deuxfleurs.fr/Deuxfleurs/garage/pulls/1361
Co-authored-by: Ira Iva <xatikopro@gmail.com>
Co-committed-by: Ira Iva <xatikopro@gmail.com>
This commit is contained in:
Ira Iva
2026-03-03 15:52:53 +00:00
committed by Alex
parent 2cfd92e0c3
commit d2f033641e
2 changed files with 8 additions and 2 deletions

View File

@@ -162,7 +162,13 @@ impl<A: ApiHandler> ApiServer<A> {
.key_id_from_request(&req)
.map(|k| format!("(key {k}) "))
.unwrap_or_default();
info!("{source} {key}{} {uri}", req.method());
if A::API_NAME == "admin" && (uri.path() == "/health" || uri.path() == "/metrics") {
debug!("{source} {key}{} {uri}", req.method());
} else {
info!("{source} {key}{} {uri}", req.method());
}
debug!("{:?}", req);
let tracer = opentelemetry::global::tracer("garage");

View File

@@ -273,7 +273,7 @@ impl NetApp {
);
}
info!(
debug!(
"Incoming connection from {}, negotiating handshake...",
peer_addr
);