diff --git a/CHANGELOG.md b/CHANGELOG.md index e4aae13364..597427db8a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ ### Fixes +- Preserve custom `Throwable` identities when R8 optimizes Android apps ([#5881](https://github.com/getsentry/sentry-java/pull/5881)) - Preserve single-sample ANR profile chunks so profiles remain available on ANR events ([#5872](https://github.com/getsentry/sentry-java/pull/5872)) - Prevent inflated cold app start when the OS spawns the process in the background (e.g. FCM push) on API 35+ ([#5841](https://github.com/getsentry/sentry-java/pull/5841)) - Avoid a CPU busy-loop when recording discarded log or metric envelopes under rate limiting ([#5835](https://github.com/getsentry/sentry-java/pull/5835)) diff --git a/sentry-android-core/proguard-rules.pro b/sentry-android-core/proguard-rules.pro index 4cd76f9a20..a66e472b07 100644 --- a/sentry-android-core/proguard-rules.pro +++ b/sentry-android-core/proguard-rules.pro @@ -29,6 +29,11 @@ # https://developer.android.com/studio/build/shrink-code#decode-stack-trace -keepattributes LineNumberTable,SourceFile +# Preserve distinct runtime identities for custom Throwables. R8 horizontal class merging can +# otherwise merge unrelated exception classes, causing the runtime type and retraced frames to +# disagree. Unused Throwables may still be removed, and retained Throwables may still be obfuscated. +-keep,allowshrinking,allowobfuscation class * extends java.lang.Throwable + # Keep Classnames for integrations -keepnames class * implements io.sentry.Integration