Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
5 changes: 5 additions & 0 deletions sentry-android-core/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be just -keepnames (which should be short for Short for -keep,allowshrinking)?

Suggested change
-keep,allowshrinking,allowobfuscation class * extends java.lang.Throwable
-keepnames class * extends java.lang.Throwable

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the idea here is to allow obfuscating the class as well, and keepnames would disable that

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We definitely need to check that R8 doesn't flag us here

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it likely does, but there's no other way to work this around, so 🤷 every crash reporter is prone to this issue. But I will check with the R8 config analyzer


# Keep Classnames for integrations
-keepnames class * implements io.sentry.Integration

Expand Down
Loading