From 1a152f74a8add9b9d94d0dc9528aac0ef0d85b12 Mon Sep 17 00:00:00 2001 From: Zac Wesley-Brown Date: Wed, 12 Nov 2025 16:26:04 +1300 Subject: [PATCH 1/2] simple debug_logs flag to cfg on/off sentry_debug! --- sentry-core/Cargo.toml | 3 ++- sentry-core/src/client.rs | 6 ++++++ sentry-core/src/logs.rs | 2 +- sentry-core/src/scope/real.rs | 1 + sentry-core/src/session.rs | 1 + sentry-log/src/lib.rs | 3 +++ sentry/src/init.rs | 4 ++++ sentry/src/transports/curl.rs | 4 ++++ sentry/src/transports/embedded_svc_http.rs | 1 + sentry/src/transports/reqwest.rs | 5 +++++ sentry/src/transports/thread.rs | 3 +++ sentry/src/transports/tokio_thread.rs | 3 +++ sentry/src/transports/ureq.rs | 5 +++++ 13 files changed, 39 insertions(+), 2 deletions(-) diff --git a/sentry-core/Cargo.toml b/sentry-core/Cargo.toml index 81a5eeda8..b16e8a51e 100644 --- a/sentry-core/Cargo.toml +++ b/sentry-core/Cargo.toml @@ -20,9 +20,10 @@ name = "scope_benchmark" harness = false [features] -default = [] +default = ["debug_logs"] client = ["rand"] test = ["client", "release-health"] +debug_logs = [] release-health = [] logs = [] diff --git a/sentry-core/src/client.rs b/sentry-core/src/client.rs index a4b72d080..28bd248e4 100644 --- a/sentry-core/src/client.rs +++ b/sentry-core/src/client.rs @@ -282,6 +282,7 @@ impl Client { event = match integration.process_event(event, &self.options) { Some(event) => event, None => { + #[cfg(feature = "debug_logs")] sentry_debug!("integration dropped event {:?}", id); return None; } @@ -302,11 +303,13 @@ impl Client { } if let Some(ref func) = self.options.before_send { + #[cfg(feature = "debug_logs")] sentry_debug!("invoking before_send callback"); let id = event.event_id; if let Some(processed_event) = func(event) { event = processed_event; } else { + #[cfg(feature = "debug_logs")] sentry_debug!("before_send dropped event {:?}", id); return None; } @@ -441,9 +444,11 @@ impl Client { drop(self.logs_batcher.write().unwrap().take()); let transport_opt = self.transport.write().unwrap().take(); if let Some(transport) = transport_opt { + #[cfg(feature = "debug_logs")] sentry_debug!("client close; request transport to shut down"); transport.shutdown(timeout.unwrap_or(self.options.shutdown_timeout)) } else { + #[cfg(feature = "debug_logs")] sentry_debug!("client close; no transport to shut down"); true } @@ -465,6 +470,7 @@ impl Client { #[cfg(feature = "logs")] pub fn capture_log(&self, log: Log, scope: &Scope) { if !self.options.enable_logs { + #[cfg(feature = "debug_logs")] sentry_debug!("[Client] called capture_log, but options.enable_logs is set to false"); return; } diff --git a/sentry-core/src/logs.rs b/sentry-core/src/logs.rs index 9be3ee335..767c375e2 100644 --- a/sentry-core/src/logs.rs +++ b/sentry-core/src/logs.rs @@ -104,8 +104,8 @@ impl LogsBatcher { return; } + #[cfg(feature = "debug_logs")] sentry_debug!("[LogsBatcher] Flushing {} logs", logs.len()); - if let Some(ref transport) = *transport.read().unwrap() { let mut envelope = Envelope::new(); let logs_item: EnvelopeItem = logs.into(); diff --git a/sentry-core/src/scope/real.rs b/sentry-core/src/scope/real.rs index 6bb2662f9..05945ac29 100644 --- a/sentry-core/src/scope/real.rs +++ b/sentry-core/src/scope/real.rs @@ -318,6 +318,7 @@ impl Scope { event = match processor(event) { Some(event) => event, None => { + #[cfg(feature = "debug_logs")] sentry_debug!("event processor dropped event {}", id); return None; } diff --git a/sentry-core/src/session.rs b/sentry-core/src/session.rs index e9fd2f298..d8302ab53 100644 --- a/sentry-core/src/session.rs +++ b/sentry-core/src/session.rs @@ -294,6 +294,7 @@ mod session_impl { bucket.abnormal += 1; } SessionStatus::Ok => { + #[cfg(feature = "debug_logs")] sentry_debug!("unreachable: only closed sessions will be enqueued"); } } diff --git a/sentry-log/src/lib.rs b/sentry-log/src/lib.rs index a01e8479f..bd13ebae5 100644 --- a/sentry-log/src/lib.rs +++ b/sentry-log/src/lib.rs @@ -54,7 +54,10 @@ //! //! let logger = sentry_log::SentryLogger::new().filter(|md| match md.level() { //! log::Level::Error => LogFilter::Event, +//! #[cfg(feature = "logs")] //! log::Level::Warn => LogFilter::Breadcrumb | LogFilter::Log, +//! #[cfg(not(feature = "logs"))] +//! log::Level::Warn => LogFilter::Breadcrumb, //! _ => LogFilter::Ignore, //! }); //! ``` diff --git a/sentry/src/init.rs b/sentry/src/init.rs index 12527f0d3..8cb49ad64 100644 --- a/sentry/src/init.rs +++ b/sentry/src/init.rs @@ -31,8 +31,10 @@ impl ClientInitGuard { impl Drop for ClientInitGuard { fn drop(&mut self) { if self.is_enabled() { + #[cfg(feature = "debug_logs")] sentry_debug!("dropping client guard -> disposing client"); } else { + #[cfg(feature = "debug_logs")] sentry_debug!("dropping client guard (no client to dispose)"); } // end any session that might be open before closing the client @@ -106,8 +108,10 @@ where Hub::with(|hub| hub.bind_client(Some(client.clone()))); if let Some(dsn) = client.dsn() { + #[cfg(feature = "debug_logs")] sentry_debug!("enabled sentry client for DSN {}", dsn); } else { + #[cfg(feature = "debug_logs")] sentry_debug!("initialized disabled sentry client due to disabled or invalid DSN"); } #[cfg(feature = "release-health")] diff --git a/sentry/src/transports/curl.rs b/sentry/src/transports/curl.rs index 7cf5a2b42..4a2e0dc6c 100644 --- a/sentry/src/transports/curl.rs +++ b/sentry/src/transports/curl.rs @@ -51,11 +51,13 @@ impl CurlHttpTransport { match (scheme, &http_proxy, &https_proxy) { (Scheme::Https, _, Some(proxy)) => { if let Err(err) = handle.proxy(proxy) { + #[cfg(feature = "debug_logs")] sentry_debug!("invalid proxy: {:?}", err); } } (_, Some(proxy), _) => { if let Err(err) = handle.proxy(proxy) { + #[cfg(feature = "debug_logs")] sentry_debug!("invalid proxy: {:?}", err); } } @@ -86,6 +88,7 @@ impl CurlHttpTransport { curl::easy::InfoType::DataOut => "", _ => return, }; + #[cfg(feature = "debug_logs")] sentry_debug!("curl: {}{}", prefix, String::from_utf8_lossy(data).trim()); }) .unwrap(); @@ -124,6 +127,7 @@ impl CurlHttpTransport { } } Err(err) => { + #[cfg(feature = "debug_logs")] sentry_debug!("Failed to send envelope: {}", err); } } diff --git a/sentry/src/transports/embedded_svc_http.rs b/sentry/src/transports/embedded_svc_http.rs index f040cb957..9e9fd99d1 100644 --- a/sentry/src/transports/embedded_svc_http.rs +++ b/sentry/src/transports/embedded_svc_http.rs @@ -58,6 +58,7 @@ impl EmbeddedSVCHttpTransport { impl Transport for EmbeddedSVCHttpTransport { fn send_envelope(&self, envelope: sentry_core::Envelope) { if let Err(err) = self.send_envelope(envelope) { + #[cfg(feature = "debug_logs")] sentry_debug!("Failed to send envelope: {}", err); } } diff --git a/sentry/src/transports/reqwest.rs b/sentry/src/transports/reqwest.rs index 9e21364a0..f176c00d6 100644 --- a/sentry/src/transports/reqwest.rs +++ b/sentry/src/transports/reqwest.rs @@ -39,6 +39,7 @@ impl ReqwestHttpTransport { builder = builder.proxy(proxy); } Err(err) => { + #[cfg(feature = "debug_logs")] sentry_debug!("invalid proxy: {:?}", err); } } @@ -49,6 +50,7 @@ impl ReqwestHttpTransport { builder = builder.proxy(proxy); } Err(err) => { + #[cfg(feature = "debug_logs")] sentry_debug!("invalid proxy: {:?}", err); } } @@ -90,14 +92,17 @@ impl ReqwestHttpTransport { match response.text().await { Err(err) => { + #[cfg(feature = "debug_logs")] sentry_debug!("Failed to read sentry response: {}", err); } Ok(text) => { + #[cfg(feature = "debug_logs")] sentry_debug!("Get response: `{}`", text); } } } Err(err) => { + #[cfg(feature = "debug_logs")] sentry_debug!("Failed to send envelope: {}", err); } } diff --git a/sentry/src/transports/thread.rs b/sentry/src/transports/thread.rs index 6ccca6fae..97f30e9d3 100644 --- a/sentry/src/transports/thread.rs +++ b/sentry/src/transports/thread.rs @@ -53,6 +53,7 @@ impl TransportThread { }; if let Some(time_left) = rl.is_disabled(RateLimitingCategory::Any) { + #[cfg(feature = "debug_logs")] sentry_debug!( "Skipping event send because we're disabled due to rate limits for {}s", time_left.as_secs() @@ -64,6 +65,7 @@ impl TransportThread { send(envelope, &mut rl); } None => { + #[cfg(feature = "debug_logs")] sentry_debug!("Envelope was discarded due to per-item rate limits"); } }; @@ -83,6 +85,7 @@ impl TransportThread { // reason, trying to send an envelope would block everything. We'd rather // drop the envelope in that case. if let Err(e) = self.sender.try_send(Task::SendEnvelope(envelope)) { + #[cfg(feature = "debug_logs")] sentry_debug!("envelope dropped: {e}"); } } diff --git a/sentry/src/transports/tokio_thread.rs b/sentry/src/transports/tokio_thread.rs index 5ef734e31..524bbedc8 100644 --- a/sentry/src/transports/tokio_thread.rs +++ b/sentry/src/transports/tokio_thread.rs @@ -63,6 +63,7 @@ impl TransportThread { }; if let Some(time_left) = rl.is_disabled(RateLimitingCategory::Any) { + #[cfg(feature = "debug_logs")] sentry_debug!( "Skipping event send because we're disabled due to rate limits for {}s", time_left.as_secs() @@ -74,6 +75,7 @@ impl TransportThread { rl = send(envelope, rl).await; }, None => { + #[cfg(feature = "debug_logs")] sentry_debug!("Envelope was discarded due to per-item rate limits"); }, }; @@ -94,6 +96,7 @@ impl TransportThread { // reason, trying to send an envelope would block everything. We'd rather // drop the envelope in that case. if let Err(e) = self.sender.try_send(Task::SendEnvelope(envelope)) { + #[cfg(feature = "debug_logs")] sentry_debug!("envelope dropped: {e}"); } } diff --git a/sentry/src/transports/ureq.rs b/sentry/src/transports/ureq.rs index 9fa20fe4b..dae6c3820 100644 --- a/sentry/src/transports/ureq.rs +++ b/sentry/src/transports/ureq.rs @@ -61,6 +61,7 @@ impl UreqHttpTransport { maybe_proxy = Some(proxy); } Err(err) => { + #[cfg(feature = "debug_logs")] sentry_debug!("invalid proxy: {:?}", err); } }, @@ -69,6 +70,7 @@ impl UreqHttpTransport { maybe_proxy = Some(proxy); } Err(err) => { + #[cfg(feature = "debug_logs")] sentry_debug!("invalid proxy: {:?}", err); } }, @@ -104,14 +106,17 @@ impl UreqHttpTransport { match response.body_mut().read_to_string() { Err(err) => { + #[cfg(feature = "debug_logs")] sentry_debug!("Failed to read sentry response: {}", err); } Ok(text) => { + #[cfg(feature = "debug_logs")] sentry_debug!("Get response: `{}`", text); } } } Err(err) => { + #[cfg(feature = "debug_logs")] sentry_debug!("Failed to send envelope: {}", err); } } From 3d34774416481d312971fa7b4c05b595849ee41b Mon Sep 17 00:00:00 2001 From: Zac Wesley-Brown Date: Thu, 13 Nov 2025 08:23:29 +1300 Subject: [PATCH 2/2] more logical rewrite with just replacing the macro on feature flag --- sentry-core/Cargo.toml | 2 +- sentry-core/src/client.rs | 6 ------ sentry-core/src/logs.rs | 1 - sentry-core/src/macros.rs | 11 +++++++++++ sentry-core/src/scope/real.rs | 1 - sentry-core/src/session.rs | 1 - sentry/Cargo.toml | 1 + sentry/src/init.rs | 4 ---- sentry/src/transports/curl.rs | 4 ---- sentry/src/transports/embedded_svc_http.rs | 1 - sentry/src/transports/reqwest.rs | 5 ----- sentry/src/transports/thread.rs | 3 --- sentry/src/transports/tokio_thread.rs | 3 --- sentry/src/transports/ureq.rs | 5 ----- 14 files changed, 13 insertions(+), 35 deletions(-) diff --git a/sentry-core/Cargo.toml b/sentry-core/Cargo.toml index b16e8a51e..043bd9528 100644 --- a/sentry-core/Cargo.toml +++ b/sentry-core/Cargo.toml @@ -20,7 +20,7 @@ name = "scope_benchmark" harness = false [features] -default = ["debug_logs"] +default = [] client = ["rand"] test = ["client", "release-health"] debug_logs = [] diff --git a/sentry-core/src/client.rs b/sentry-core/src/client.rs index 28bd248e4..a4b72d080 100644 --- a/sentry-core/src/client.rs +++ b/sentry-core/src/client.rs @@ -282,7 +282,6 @@ impl Client { event = match integration.process_event(event, &self.options) { Some(event) => event, None => { - #[cfg(feature = "debug_logs")] sentry_debug!("integration dropped event {:?}", id); return None; } @@ -303,13 +302,11 @@ impl Client { } if let Some(ref func) = self.options.before_send { - #[cfg(feature = "debug_logs")] sentry_debug!("invoking before_send callback"); let id = event.event_id; if let Some(processed_event) = func(event) { event = processed_event; } else { - #[cfg(feature = "debug_logs")] sentry_debug!("before_send dropped event {:?}", id); return None; } @@ -444,11 +441,9 @@ impl Client { drop(self.logs_batcher.write().unwrap().take()); let transport_opt = self.transport.write().unwrap().take(); if let Some(transport) = transport_opt { - #[cfg(feature = "debug_logs")] sentry_debug!("client close; request transport to shut down"); transport.shutdown(timeout.unwrap_or(self.options.shutdown_timeout)) } else { - #[cfg(feature = "debug_logs")] sentry_debug!("client close; no transport to shut down"); true } @@ -470,7 +465,6 @@ impl Client { #[cfg(feature = "logs")] pub fn capture_log(&self, log: Log, scope: &Scope) { if !self.options.enable_logs { - #[cfg(feature = "debug_logs")] sentry_debug!("[Client] called capture_log, but options.enable_logs is set to false"); return; } diff --git a/sentry-core/src/logs.rs b/sentry-core/src/logs.rs index 767c375e2..523f47c24 100644 --- a/sentry-core/src/logs.rs +++ b/sentry-core/src/logs.rs @@ -104,7 +104,6 @@ impl LogsBatcher { return; } - #[cfg(feature = "debug_logs")] sentry_debug!("[LogsBatcher] Flushing {} logs", logs.len()); if let Some(ref transport) = *transport.read().unwrap() { let mut envelope = Envelope::new(); diff --git a/sentry-core/src/macros.rs b/sentry-core/src/macros.rs index edb75dcd5..ca32a2623 100644 --- a/sentry-core/src/macros.rs +++ b/sentry-core/src/macros.rs @@ -53,6 +53,7 @@ macro_rules! with_client_impl { // TODO: temporarily exported for use in `sentry` crate #[macro_export] #[doc(hidden)] +#[cfg(feature = "debug_logs")] macro_rules! sentry_debug { ($($arg:tt)*) => { $crate::Hub::with(|hub| { @@ -64,6 +65,16 @@ macro_rules! sentry_debug { } } +/// Replace the exported macro with a no-op macro when debug_logs is disabled. +#[macro_export] +#[doc(hidden)] +#[cfg(not(feature = "debug_logs"))] +macro_rules! sentry_debug { + ($($arg:tt)*) => { + (); + }; +} + #[allow(unused_macros)] macro_rules! minimal_unreachable { () => { diff --git a/sentry-core/src/scope/real.rs b/sentry-core/src/scope/real.rs index 05945ac29..6bb2662f9 100644 --- a/sentry-core/src/scope/real.rs +++ b/sentry-core/src/scope/real.rs @@ -318,7 +318,6 @@ impl Scope { event = match processor(event) { Some(event) => event, None => { - #[cfg(feature = "debug_logs")] sentry_debug!("event processor dropped event {}", id); return None; } diff --git a/sentry-core/src/session.rs b/sentry-core/src/session.rs index d8302ab53..e9fd2f298 100644 --- a/sentry-core/src/session.rs +++ b/sentry-core/src/session.rs @@ -294,7 +294,6 @@ mod session_impl { bucket.abnormal += 1; } SessionStatus::Ok => { - #[cfg(feature = "debug_logs")] sentry_debug!("unreachable: only closed sessions will be enqueued"); } } diff --git a/sentry/Cargo.toml b/sentry/Cargo.toml index 225df0c60..beaebc127 100644 --- a/sentry/Cargo.toml +++ b/sentry/Cargo.toml @@ -49,6 +49,7 @@ opentelemetry = ["sentry-opentelemetry"] test = ["sentry-core/test"] release-health = ["sentry-core/release-health", "sentry-actix?/release-health"] logs = ["sentry-core/logs", "sentry-tracing?/logs", "sentry-log?/logs"] +debug_logs = ["sentry-core/debug_logs"] # transports transport = ["reqwest", "native-tls"] reqwest = ["dep:reqwest", "httpdate", "tokio"] diff --git a/sentry/src/init.rs b/sentry/src/init.rs index 8cb49ad64..12527f0d3 100644 --- a/sentry/src/init.rs +++ b/sentry/src/init.rs @@ -31,10 +31,8 @@ impl ClientInitGuard { impl Drop for ClientInitGuard { fn drop(&mut self) { if self.is_enabled() { - #[cfg(feature = "debug_logs")] sentry_debug!("dropping client guard -> disposing client"); } else { - #[cfg(feature = "debug_logs")] sentry_debug!("dropping client guard (no client to dispose)"); } // end any session that might be open before closing the client @@ -108,10 +106,8 @@ where Hub::with(|hub| hub.bind_client(Some(client.clone()))); if let Some(dsn) = client.dsn() { - #[cfg(feature = "debug_logs")] sentry_debug!("enabled sentry client for DSN {}", dsn); } else { - #[cfg(feature = "debug_logs")] sentry_debug!("initialized disabled sentry client due to disabled or invalid DSN"); } #[cfg(feature = "release-health")] diff --git a/sentry/src/transports/curl.rs b/sentry/src/transports/curl.rs index 4a2e0dc6c..7cf5a2b42 100644 --- a/sentry/src/transports/curl.rs +++ b/sentry/src/transports/curl.rs @@ -51,13 +51,11 @@ impl CurlHttpTransport { match (scheme, &http_proxy, &https_proxy) { (Scheme::Https, _, Some(proxy)) => { if let Err(err) = handle.proxy(proxy) { - #[cfg(feature = "debug_logs")] sentry_debug!("invalid proxy: {:?}", err); } } (_, Some(proxy), _) => { if let Err(err) = handle.proxy(proxy) { - #[cfg(feature = "debug_logs")] sentry_debug!("invalid proxy: {:?}", err); } } @@ -88,7 +86,6 @@ impl CurlHttpTransport { curl::easy::InfoType::DataOut => "", _ => return, }; - #[cfg(feature = "debug_logs")] sentry_debug!("curl: {}{}", prefix, String::from_utf8_lossy(data).trim()); }) .unwrap(); @@ -127,7 +124,6 @@ impl CurlHttpTransport { } } Err(err) => { - #[cfg(feature = "debug_logs")] sentry_debug!("Failed to send envelope: {}", err); } } diff --git a/sentry/src/transports/embedded_svc_http.rs b/sentry/src/transports/embedded_svc_http.rs index 9e9fd99d1..f040cb957 100644 --- a/sentry/src/transports/embedded_svc_http.rs +++ b/sentry/src/transports/embedded_svc_http.rs @@ -58,7 +58,6 @@ impl EmbeddedSVCHttpTransport { impl Transport for EmbeddedSVCHttpTransport { fn send_envelope(&self, envelope: sentry_core::Envelope) { if let Err(err) = self.send_envelope(envelope) { - #[cfg(feature = "debug_logs")] sentry_debug!("Failed to send envelope: {}", err); } } diff --git a/sentry/src/transports/reqwest.rs b/sentry/src/transports/reqwest.rs index f176c00d6..9e21364a0 100644 --- a/sentry/src/transports/reqwest.rs +++ b/sentry/src/transports/reqwest.rs @@ -39,7 +39,6 @@ impl ReqwestHttpTransport { builder = builder.proxy(proxy); } Err(err) => { - #[cfg(feature = "debug_logs")] sentry_debug!("invalid proxy: {:?}", err); } } @@ -50,7 +49,6 @@ impl ReqwestHttpTransport { builder = builder.proxy(proxy); } Err(err) => { - #[cfg(feature = "debug_logs")] sentry_debug!("invalid proxy: {:?}", err); } } @@ -92,17 +90,14 @@ impl ReqwestHttpTransport { match response.text().await { Err(err) => { - #[cfg(feature = "debug_logs")] sentry_debug!("Failed to read sentry response: {}", err); } Ok(text) => { - #[cfg(feature = "debug_logs")] sentry_debug!("Get response: `{}`", text); } } } Err(err) => { - #[cfg(feature = "debug_logs")] sentry_debug!("Failed to send envelope: {}", err); } } diff --git a/sentry/src/transports/thread.rs b/sentry/src/transports/thread.rs index 97f30e9d3..6ccca6fae 100644 --- a/sentry/src/transports/thread.rs +++ b/sentry/src/transports/thread.rs @@ -53,7 +53,6 @@ impl TransportThread { }; if let Some(time_left) = rl.is_disabled(RateLimitingCategory::Any) { - #[cfg(feature = "debug_logs")] sentry_debug!( "Skipping event send because we're disabled due to rate limits for {}s", time_left.as_secs() @@ -65,7 +64,6 @@ impl TransportThread { send(envelope, &mut rl); } None => { - #[cfg(feature = "debug_logs")] sentry_debug!("Envelope was discarded due to per-item rate limits"); } }; @@ -85,7 +83,6 @@ impl TransportThread { // reason, trying to send an envelope would block everything. We'd rather // drop the envelope in that case. if let Err(e) = self.sender.try_send(Task::SendEnvelope(envelope)) { - #[cfg(feature = "debug_logs")] sentry_debug!("envelope dropped: {e}"); } } diff --git a/sentry/src/transports/tokio_thread.rs b/sentry/src/transports/tokio_thread.rs index 524bbedc8..5ef734e31 100644 --- a/sentry/src/transports/tokio_thread.rs +++ b/sentry/src/transports/tokio_thread.rs @@ -63,7 +63,6 @@ impl TransportThread { }; if let Some(time_left) = rl.is_disabled(RateLimitingCategory::Any) { - #[cfg(feature = "debug_logs")] sentry_debug!( "Skipping event send because we're disabled due to rate limits for {}s", time_left.as_secs() @@ -75,7 +74,6 @@ impl TransportThread { rl = send(envelope, rl).await; }, None => { - #[cfg(feature = "debug_logs")] sentry_debug!("Envelope was discarded due to per-item rate limits"); }, }; @@ -96,7 +94,6 @@ impl TransportThread { // reason, trying to send an envelope would block everything. We'd rather // drop the envelope in that case. if let Err(e) = self.sender.try_send(Task::SendEnvelope(envelope)) { - #[cfg(feature = "debug_logs")] sentry_debug!("envelope dropped: {e}"); } } diff --git a/sentry/src/transports/ureq.rs b/sentry/src/transports/ureq.rs index dae6c3820..9fa20fe4b 100644 --- a/sentry/src/transports/ureq.rs +++ b/sentry/src/transports/ureq.rs @@ -61,7 +61,6 @@ impl UreqHttpTransport { maybe_proxy = Some(proxy); } Err(err) => { - #[cfg(feature = "debug_logs")] sentry_debug!("invalid proxy: {:?}", err); } }, @@ -70,7 +69,6 @@ impl UreqHttpTransport { maybe_proxy = Some(proxy); } Err(err) => { - #[cfg(feature = "debug_logs")] sentry_debug!("invalid proxy: {:?}", err); } }, @@ -106,17 +104,14 @@ impl UreqHttpTransport { match response.body_mut().read_to_string() { Err(err) => { - #[cfg(feature = "debug_logs")] sentry_debug!("Failed to read sentry response: {}", err); } Ok(text) => { - #[cfg(feature = "debug_logs")] sentry_debug!("Get response: `{}`", text); } } } Err(err) => { - #[cfg(feature = "debug_logs")] sentry_debug!("Failed to send envelope: {}", err); } }