fix(replay): dont set isTerminating on captureReplay for android#3037
Merged
Conversation
Contributor
🚨 Detected changes in high risk code 🚨High-risk code has higher potential to break the SDK and may be hard to test. To prevent severe bugs, apply the rollout process for releasing such changes and be extra careful when changing and reviewing these files:
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3037 +/- ##
==========================================
+ Coverage 87.97% 89.79% +1.81%
==========================================
Files 287 96 -191
Lines 9533 3331 -6202
==========================================
- Hits 8387 2991 -5396
+ Misses 1146 340 -806 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…ureReplay-android
…ureReplay-android
denrase
requested changes
Jul 3, 2025
Contributor
Author
|
@denrase updated it 👍 |
Contributor
iOS Performance metrics 🚀
|
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| c8596a6 | 1234.11 ms | 1241.19 ms | 7.08 ms |
| 827bf09 | 1261.86 ms | 1276.41 ms | 14.55 ms |
| 2d34233 | 1258.19 ms | 1268.92 ms | 10.73 ms |
| 6ba4675 | 1223.12 ms | 1238.17 ms | 15.04 ms |
| 93b7728 | 1247.23 ms | 1264.87 ms | 17.64 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| c8596a6 | 7.86 MiB | 9.44 MiB | 1.58 MiB |
| 827bf09 | 7.86 MiB | 9.44 MiB | 1.58 MiB |
| 2d34233 | 7.86 MiB | 9.44 MiB | 1.58 MiB |
| 6ba4675 | 7.86 MiB | 9.44 MiB | 1.58 MiB |
| 93b7728 | 7.86 MiB | 9.44 MiB | 1.58 MiB |
Previous results on branch: fix/dont-set-is-crash-captureReplay-android
Startup times
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 2d02261 | 1246.74 ms | 1268.15 ms | 21.40 ms |
| 3de5a40 | 1258.85 ms | 1270.92 ms | 12.07 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 2d02261 | 7.86 MiB | 9.44 MiB | 1.58 MiB |
| 3de5a40 | 7.86 MiB | 9.44 MiB | 1.58 MiB |
Contributor
Android Performance metrics 🚀
|
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| c8596a6 | 474.00 ms | 492.96 ms | 18.96 ms |
| 93b7728 | 475.28 ms | 489.13 ms | 13.86 ms |
| 6ba4675 | 499.80 ms | 632.43 ms | 132.63 ms |
| 827bf09 | 475.40 ms | 547.14 ms | 71.74 ms |
| 2d34233 | 470.54 ms | 558.90 ms | 88.36 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| c8596a6 | 6.54 MiB | 7.53 MiB | 1015.27 KiB |
| 93b7728 | 6.54 MiB | 7.69 MiB | 1.15 MiB |
| 6ba4675 | 6.54 MiB | 7.53 MiB | 1015.26 KiB |
| 827bf09 | 6.54 MiB | 7.53 MiB | 1015.27 KiB |
| 2d34233 | 6.54 MiB | 7.55 MiB | 1.01 MiB |
Previous results on branch: fix/dont-set-is-crash-captureReplay-android
Startup times
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 3de5a40 | 472.27 ms | 532.69 ms | 60.42 ms |
| 2d02261 | 425.94 ms | 494.69 ms | 68.76 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 3de5a40 | 6.54 MiB | 7.55 MiB | 1.01 MiB |
| 2d02261 | 6.54 MiB | 7.55 MiB | 1.01 MiB |
denrase
approved these changes
Jul 4, 2025
denrase
left a comment
Collaborator
There was a problem hiding this comment.
Just a small suggestion.
| return | ||
| } | ||
| replay!!.captureReplay(isCrash) | ||
| replay!!.captureReplay(isTerminating = false) |
Collaborator
There was a problem hiding this comment.
Just a small thin, but maybe we could safley unpack the otpional replay. If for some reason this becomes nil, we will crash here.
Contributor
Author
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
💡 Motivation and Context
Fixes a bug where we set the
isTerminatingparameter oncaptureReplayto true if an unhandled error happens.This is a bug because Android replay will stop capturing segments as it expects the app to terminate - so for flutter we potentially run into missing segments
💚 How did you test it?
📝 Checklist
sendDefaultPiiis enabled🔮 Next steps