From 47aa235de155dedd0826ef96e50a595927e29849 Mon Sep 17 00:00:00 2001 From: lcian <17258265+lcian@users.noreply.github.com> Date: Thu, 25 Sep 2025 12:10:07 +0200 Subject: [PATCH 1/3] ref(logs): enable logs if logs feature flag is used --- sentry-core/src/clientoptions.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sentry-core/src/clientoptions.rs b/sentry-core/src/clientoptions.rs index ff4a07f9..33b5bbd4 100644 --- a/sentry-core/src/clientoptions.rs +++ b/sentry-core/src/clientoptions.rs @@ -325,7 +325,7 @@ impl Default for ClientOptions { user_agent: Cow::Borrowed(USER_AGENT), max_request_body_size: MaxRequestBodySize::Medium, #[cfg(feature = "logs")] - enable_logs: false, + enable_logs: true, #[cfg(feature = "logs")] before_send_log: None, } From 56f1542a68ac995e31f26b9fd3d90145df6e8498 Mon Sep 17 00:00:00 2001 From: lcian <17258265+lcian@users.noreply.github.com> Date: Tue, 30 Sep 2025 13:45:35 +0200 Subject: [PATCH 2/3] changelog --- CHANGELOG.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1b6cd5e9..1a058a55 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,14 @@ # Changelog +## Unreleased + +### Behavioral changes + +- ref(logs): enable logs by default if logs feature flag is used ([#910](https://github.com/getsentry/sentry-rust/pull/910)) + - This changes the default value of `sentry::ClientOptions::enable_logs` to `true`. + - This simplifies the setup of Sentry structured logs by requiring users to just add the `log` feature flag to the `sentry` dependency to opt-in to sending logs. + - When the `log` feature flag is enabled, the `tracing` and `log` integrations will send structured logs to Sentry for all logs/events at or above INFO level by default. + ## 0.43.0 ### Breaking changes From a4aa065937d6ed6d774a92914fb3700a9a0cd8e9 Mon Sep 17 00:00:00 2001 From: lcian <17258265+lcian@users.noreply.github.com> Date: Tue, 30 Sep 2025 13:46:17 +0200 Subject: [PATCH 3/3] changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1a058a55..91c44dbf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ ### Behavioral changes -- ref(logs): enable logs by default if logs feature flag is used ([#910](https://github.com/getsentry/sentry-rust/pull/910)) +- ref(logs): enable logs by default if logs feature flag is used ([#910](https://github.com/getsentry/sentry-rust/pull/910)) by @lcian - This changes the default value of `sentry::ClientOptions::enable_logs` to `true`. - This simplifies the setup of Sentry structured logs by requiring users to just add the `log` feature flag to the `sentry` dependency to opt-in to sending logs. - When the `log` feature flag is enabled, the `tracing` and `log` integrations will send structured logs to Sentry for all logs/events at or above INFO level by default.