From 1aa059d8e421ed45f0223d8223e4bc6d9804cd77 Mon Sep 17 00:00:00 2001 From: Daniel Szoke Date: Tue, 28 Apr 2026 11:43:04 +0200 Subject: [PATCH 1/3] meta(changelog): Additional context around semver fixes --- CHANGELOG.md | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cec67e91..c1ed7400 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,11 +4,16 @@ ### Breaking Changes -- [`sentry_core::ClientOptions`](https://docs.rs/sentry-core/latest/sentry_core/struct.ClientOptions.html) fields [`before_send_log`](https://docs.rs/sentry-core/latest/sentry_core/struct.ClientOptions.html#structfield.before_send_log), [`enable_logs`](https://docs.rs/sentry-core/latest/sentry_core/struct.ClientOptions.html#structfield.enable_logs), [`auto_session_tracking`](https://docs.rs/sentry-core/latest/sentry_core/struct.ClientOptions.html#structfield.auto_session_tracking), and [`session_mode`](https://docs.rs/sentry-core/latest/sentry_core/struct.ClientOptions.html#structfield.session_mode) are no longer gated behind the `logs` and `release-health` feature flags ([#1091](https://github.com/getsentry/sentry-rust/pull/1091)). Code that constructs `ClientOptions` with a full struct literal (without `..Default::default()`), or which exhaustively matches against it, must now include all four fields regardless of enabled features. -- [`sentry_core::Scope`](https://docs.rs/sentry-core/latest/sentry_core/struct.Scope.html) can no longer be publicly constructed or exhaustively matched against, even when the `client` feature is disabled ([#1094](https://github.com/getsentry/sentry-rust/pull/1094)). Previously, both of these were possible when `client` was disabled. -- [`sentry_core::Scope::add_event_processor`](https://docs.rs/sentry-core/latest/sentry_core/struct.Scope.html#method.add_event_processor) now requires passed closures to be `RefUnwindSafe` ([#1093](https://github.com/getsentry/sentry-rust/pull/1093)). Thanks to this change, [`sentry_core::Scope`](https://docs.rs/sentry-core/latest/sentry_core/struct.Scope.html) is now [`UnwindSafe`](https://docs.rs/sentry-core/latest/sentry_core/struct.Scope.html#impl-UnwindSafe-for-Scope) regardless of feature flag configuration; previously, `Scope` was only `UnwindSafe` when the `client` feature was disabled. was disabled. -- [`sentry_tracing::EventMapping](https://docs.rs/sentry-tracing/latest/sentry_tracing/enum.EventMapping.html) is now ``#[non_exhaustive]`` ([#1097](https://github.com/getsentry/sentry-rust/pull/1097)). -- [`sentry_log::RecordMapping](https://docs.rs/sentry-log/latest/sentry_log/enum.RecordMapping.html) is now ``#[non_exhaustive]`` ([#1098](https://github.com/getsentry/sentry-rust/pull/1098)). +- There are several breakages related to the [SemVer feature additivity bug fixes](#semver-additivity-bug-fixes-2026-04): + - [`sentry_core::ClientOptions`](https://docs.rs/sentry-core/latest/sentry_core/struct.ClientOptions.html) fields [`before_send_log`](https://docs.rs/sentry-core/latest/sentry_core/struct.ClientOptions.html#structfield.before_send_log), [`enable_logs`](https://docs.rs/sentry-core/latest/sentry_core/struct.ClientOptions.html#structfield.enable_logs), [`auto_session_tracking`](https://docs.rs/sentry-core/latest/sentry_core/struct.ClientOptions.html#structfield.auto_session_tracking), and [`session_mode`](https://docs.rs/sentry-core/latest/sentry_core/struct.ClientOptions.html#structfield.session_mode) are no longer gated behind the `logs` and `release-health` feature flags ([#1091](https://github.com/getsentry/sentry-rust/pull/1091)). Code that constructs `ClientOptions` with a full struct literal (without `..Default::default()`), or which exhaustively matches against it, must now include all four fields regardless of enabled features. + - [`sentry_core::Scope`](https://docs.rs/sentry-core/latest/sentry_core/struct.Scope.html) can no longer be publicly constructed or exhaustively matched against, even when the `client` feature is disabled ([#1094](https://github.com/getsentry/sentry-rust/pull/1094)). Previously, both of these were possible when `client` was disabled. + - [`sentry_core::Scope::add_event_processor`](https://docs.rs/sentry-core/latest/sentry_core/struct.Scope.html#method.add_event_processor) now requires passed closures to be `RefUnwindSafe` ([#1093](https://github.com/getsentry/sentry-rust/pull/1093)). Thanks to this change, [`sentry_core::Scope`](https://docs.rs/sentry-core/latest/sentry_core/struct.Scope.html) is now [`UnwindSafe`](https://docs.rs/sentry-core/latest/sentry_core/struct.Scope.html#impl-UnwindSafe-for-Scope) regardless of feature flag configuration; previously, `Scope` was only `UnwindSafe` when the `client` feature was disabled. was disabled. + - [`sentry_tracing::EventMapping](https://docs.rs/sentry-tracing/latest/sentry_tracing/enum.EventMapping.html) is now ``#[non_exhaustive]`` ([#1097](https://github.com/getsentry/sentry-rust/pull/1097)). + - [`sentry_log::RecordMapping](https://docs.rs/sentry-log/latest/sentry_log/enum.RecordMapping.html) is now ``#[non_exhaustive]`` ([#1098](https://github.com/getsentry/sentry-rust/pull/1098)). + +### Fixes + +- Fixed several [feature additivity SemVer violations](https://doc.rust-lang.org/cargo/reference/features.html#semver-compatibility), where enabling a feature flag could have introduced breaking changes. All known violations are fixed now, so simply enabling an additional feature flag in any Sentry SDK crate should no longer cause any public API breakages. Fixing these issues required us to break the public API in some places; those breakages are detailed above. ## 0.47.0 From cff02fa2478ade8e687111c07e855c2fe7ceea43 Mon Sep 17 00:00:00 2001 From: Daniel Szoke Date: Tue, 28 Apr 2026 11:45:07 +0200 Subject: [PATCH 2/3] fixup! correct typo --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c1ed7400..cce29748 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,7 @@ - There are several breakages related to the [SemVer feature additivity bug fixes](#semver-additivity-bug-fixes-2026-04): - [`sentry_core::ClientOptions`](https://docs.rs/sentry-core/latest/sentry_core/struct.ClientOptions.html) fields [`before_send_log`](https://docs.rs/sentry-core/latest/sentry_core/struct.ClientOptions.html#structfield.before_send_log), [`enable_logs`](https://docs.rs/sentry-core/latest/sentry_core/struct.ClientOptions.html#structfield.enable_logs), [`auto_session_tracking`](https://docs.rs/sentry-core/latest/sentry_core/struct.ClientOptions.html#structfield.auto_session_tracking), and [`session_mode`](https://docs.rs/sentry-core/latest/sentry_core/struct.ClientOptions.html#structfield.session_mode) are no longer gated behind the `logs` and `release-health` feature flags ([#1091](https://github.com/getsentry/sentry-rust/pull/1091)). Code that constructs `ClientOptions` with a full struct literal (without `..Default::default()`), or which exhaustively matches against it, must now include all four fields regardless of enabled features. - [`sentry_core::Scope`](https://docs.rs/sentry-core/latest/sentry_core/struct.Scope.html) can no longer be publicly constructed or exhaustively matched against, even when the `client` feature is disabled ([#1094](https://github.com/getsentry/sentry-rust/pull/1094)). Previously, both of these were possible when `client` was disabled. - - [`sentry_core::Scope::add_event_processor`](https://docs.rs/sentry-core/latest/sentry_core/struct.Scope.html#method.add_event_processor) now requires passed closures to be `RefUnwindSafe` ([#1093](https://github.com/getsentry/sentry-rust/pull/1093)). Thanks to this change, [`sentry_core::Scope`](https://docs.rs/sentry-core/latest/sentry_core/struct.Scope.html) is now [`UnwindSafe`](https://docs.rs/sentry-core/latest/sentry_core/struct.Scope.html#impl-UnwindSafe-for-Scope) regardless of feature flag configuration; previously, `Scope` was only `UnwindSafe` when the `client` feature was disabled. was disabled. + - [`sentry_core::Scope::add_event_processor`](https://docs.rs/sentry-core/latest/sentry_core/struct.Scope.html#method.add_event_processor) now requires passed closures to be `RefUnwindSafe` ([#1093](https://github.com/getsentry/sentry-rust/pull/1093)). Thanks to this change, [`sentry_core::Scope`](https://docs.rs/sentry-core/latest/sentry_core/struct.Scope.html) is now [`UnwindSafe`](https://docs.rs/sentry-core/latest/sentry_core/struct.Scope.html#impl-UnwindSafe-for-Scope) regardless of feature flag configuration; previously, `Scope` was only `UnwindSafe` when the `client` feature was disabled. - [`sentry_tracing::EventMapping](https://docs.rs/sentry-tracing/latest/sentry_tracing/enum.EventMapping.html) is now ``#[non_exhaustive]`` ([#1097](https://github.com/getsentry/sentry-rust/pull/1097)). - [`sentry_log::RecordMapping](https://docs.rs/sentry-log/latest/sentry_log/enum.RecordMapping.html) is now ``#[non_exhaustive]`` ([#1098](https://github.com/getsentry/sentry-rust/pull/1098)). From fbcc0f3d6a1448e08dfe4ed0884e56e0a05fc299 Mon Sep 17 00:00:00 2001 From: Daniel Szoke Date: Tue, 28 Apr 2026 11:48:36 +0200 Subject: [PATCH 3/3] fixup! more typos --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cce29748..4571fccf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,8 +8,8 @@ - [`sentry_core::ClientOptions`](https://docs.rs/sentry-core/latest/sentry_core/struct.ClientOptions.html) fields [`before_send_log`](https://docs.rs/sentry-core/latest/sentry_core/struct.ClientOptions.html#structfield.before_send_log), [`enable_logs`](https://docs.rs/sentry-core/latest/sentry_core/struct.ClientOptions.html#structfield.enable_logs), [`auto_session_tracking`](https://docs.rs/sentry-core/latest/sentry_core/struct.ClientOptions.html#structfield.auto_session_tracking), and [`session_mode`](https://docs.rs/sentry-core/latest/sentry_core/struct.ClientOptions.html#structfield.session_mode) are no longer gated behind the `logs` and `release-health` feature flags ([#1091](https://github.com/getsentry/sentry-rust/pull/1091)). Code that constructs `ClientOptions` with a full struct literal (without `..Default::default()`), or which exhaustively matches against it, must now include all four fields regardless of enabled features. - [`sentry_core::Scope`](https://docs.rs/sentry-core/latest/sentry_core/struct.Scope.html) can no longer be publicly constructed or exhaustively matched against, even when the `client` feature is disabled ([#1094](https://github.com/getsentry/sentry-rust/pull/1094)). Previously, both of these were possible when `client` was disabled. - [`sentry_core::Scope::add_event_processor`](https://docs.rs/sentry-core/latest/sentry_core/struct.Scope.html#method.add_event_processor) now requires passed closures to be `RefUnwindSafe` ([#1093](https://github.com/getsentry/sentry-rust/pull/1093)). Thanks to this change, [`sentry_core::Scope`](https://docs.rs/sentry-core/latest/sentry_core/struct.Scope.html) is now [`UnwindSafe`](https://docs.rs/sentry-core/latest/sentry_core/struct.Scope.html#impl-UnwindSafe-for-Scope) regardless of feature flag configuration; previously, `Scope` was only `UnwindSafe` when the `client` feature was disabled. - - [`sentry_tracing::EventMapping](https://docs.rs/sentry-tracing/latest/sentry_tracing/enum.EventMapping.html) is now ``#[non_exhaustive]`` ([#1097](https://github.com/getsentry/sentry-rust/pull/1097)). - - [`sentry_log::RecordMapping](https://docs.rs/sentry-log/latest/sentry_log/enum.RecordMapping.html) is now ``#[non_exhaustive]`` ([#1098](https://github.com/getsentry/sentry-rust/pull/1098)). + - [`sentry_tracing::EventMapping`](https://docs.rs/sentry-tracing/latest/sentry_tracing/enum.EventMapping.html) is now ``#[non_exhaustive]`` ([#1097](https://github.com/getsentry/sentry-rust/pull/1097)). + - [`sentry_log::RecordMapping`](https://docs.rs/sentry-log/latest/sentry_log/enum.RecordMapping.html) is now ``#[non_exhaustive]`` ([#1098](https://github.com/getsentry/sentry-rust/pull/1098)). ### Fixes