From e07e45ed29c1deb8aa70ba6e00176f27837f24ea Mon Sep 17 00:00:00 2001 From: Thomas Eizinger Date: Thu, 31 Jul 2025 03:46:59 +0000 Subject: [PATCH] chore(snownet): allow filtering TURN traffic in logs (#10061) Our TURN traffic is fairly minimal for this to be okay on DEBUG (instead of TRACE). However, it can be quite noisy when one is just scanning through the logs. Putting it on another target allows us to filter those out later. Note that these only concern the TURN control protocol. Channel data messages are separate from this and **not** logged. --- rust/connlib/snownet/src/allocation.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rust/connlib/snownet/src/allocation.rs b/rust/connlib/snownet/src/allocation.rs index b4948015c..15342a065 100644 --- a/rust/connlib/snownet/src/allocation.rs +++ b/rust/connlib/snownet/src/allocation.rs @@ -359,14 +359,14 @@ impl Allocation { let rtt = now.duration_since(backoff.start_time()); Span::current().record("rtt", field::debug(rtt)); - if tracing::enabled!(tracing::Level::DEBUG) { + if tracing::enabled!(target: "wire::turn", tracing::Level::DEBUG) { let request = original_request .attributes() .map(display_attr) .collect::>(); let response = message.attributes().map(display_attr).collect::>(); - tracing::debug!(?request, ?response); + tracing::debug!(target: "wire::turn", ?request, ?response); } if let Some(error) = message.get_attribute::() {