fix(android): Backfill exit options when app is unchanged#5762
Draft
romtsn wants to merge 1 commit into
Draft
Conversation
Use current options when persisted values are missing and the app has not been updated since the exit. Avoid attributing historical crashes to a newer app version.
Contributor
Instructions and example for changelogPlease add an entry to Example: ## Unreleased
### Fixes
- Backfill exit options when app is unchanged ([#5762](https://github.com/getsentry/sentry-java/pull/5762))If none of the above apply, you can opt out of this check by adding |
📲 Install BuildsAndroid
|
Contributor
Performance metrics 🚀
|
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 4fc476b | 280.63 ms | 363.04 ms | 82.42 ms |
| 6b019b7 | 343.31 ms | 417.23 ms | 73.91 ms |
| 83884a0 | 334.46 ms | 400.92 ms | 66.46 ms |
| 319f256 | 315.96 ms | 372.96 ms | 57.00 ms |
| e63ad34 | 297.04 ms | 369.90 ms | 72.86 ms |
| d15471f | 322.58 ms | 396.08 ms | 73.50 ms |
| d364ace | 382.77 ms | 443.21 ms | 60.44 ms |
| 7314dbe | 437.83 ms | 505.64 ms | 67.81 ms |
| 05aa61d | 320.22 ms | 346.47 ms | 26.24 ms |
| 0eaac1e | 316.82 ms | 357.34 ms | 40.52 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 4fc476b | 0 B | 0 B | 0 B |
| 6b019b7 | 0 B | 0 B | 0 B |
| 83884a0 | 1.58 MiB | 2.29 MiB | 722.97 KiB |
| 319f256 | 1.58 MiB | 2.19 MiB | 619.79 KiB |
| e63ad34 | 0 B | 0 B | 0 B |
| d15471f | 1.58 MiB | 2.13 MiB | 559.54 KiB |
| d364ace | 1.58 MiB | 2.11 MiB | 539.75 KiB |
| 7314dbe | 1.58 MiB | 2.10 MiB | 533.45 KiB |
| 05aa61d | 0 B | 0 B | 0 B |
| 0eaac1e | 1.58 MiB | 2.19 MiB | 619.17 KiB |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📜 Description
Backfill release, environment, distribution, and app version data from the current options when persisted values are unavailable and the app has not been updated since an ANR or native crash.
Treat a missing or invalid package update timestamp conservatively so historical crashes are not attributed to the current app version.
💡 Motivation and Context
Exit events can be missing persisted option values. Current options are safe fallback values only when the installed app version has not changed since the exit; otherwise they can attach metadata from a newer release to an older crash.
💚 How did you test it?
./gradlew ':sentry-android-core:testDebugUnitTest' --tests='*ApplicationExitInfoEventProcessorTest*' --info(42 tests passed)./gradlew spotlessApply apiDump📝 Checklist
sendDefaultPIIis enabled.🔮 Next steps
None.