[SR] Support replays for crashes in buffer and session modes#3609
Merged
romtsn merged 10 commits intoJul 30, 2024
Conversation
Contributor
Performance metrics 🚀
|
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| c08178b | 463.49 ms | 521.56 ms | 58.07 ms |
| 67eeea2 | 418.83 ms | 468.14 ms | 49.31 ms |
| cde588a | 434.92 ms | 521.49 ms | 86.57 ms |
| 1a9eb03 | 380.06 ms | 449.65 ms | 69.59 ms |
| 80061b7 | 395.55 ms | 462.64 ms | 67.09 ms |
| 11e9a81 | 384.38 ms | 469.45 ms | 85.07 ms |
| eb8377e | 325.29 ms | 378.86 ms | 53.57 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| c08178b | 1.70 MiB | 2.34 MiB | 657.87 KiB |
| 67eeea2 | 1.70 MiB | 2.34 MiB | 657.87 KiB |
| cde588a | 1.70 MiB | 2.34 MiB | 658.00 KiB |
| 1a9eb03 | 1.70 MiB | 2.34 MiB | 657.61 KiB |
| 80061b7 | 1.70 MiB | 2.34 MiB | 658.13 KiB |
| 11e9a81 | 1.70 MiB | 2.34 MiB | 658.20 KiB |
| eb8377e | 1.70 MiB | 2.34 MiB | 658.10 KiB |
Previous results on branch: rz/feat/session-replay-crashes
Startup times
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| f92f141 | 409.55 ms | 490.19 ms | 80.65 ms |
| 828b30b | 446.63 ms | 539.67 ms | 93.04 ms |
| 2e2a18e | 543.10 ms | 617.62 ms | 74.52 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| f92f141 | 1.70 MiB | 2.34 MiB | 659.63 KiB |
| 828b30b | 1.70 MiB | 2.35 MiB | 660.25 KiB |
| 2e2a18e | 1.70 MiB | 2.34 MiB | 659.62 KiB |
markushi
approved these changes
Jul 30, 2024
markushi
left a comment
Member
There was a problem hiding this comment.
Nice one, great to see this all coming together. Left a few minor comments
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.
#skip-changelog
📜 Description
replayIdto scope until an error happens (and in the case of an ANR we don't know until next restart), the persistedreplayIdto disk might be irrelevant. So we have to iterate through the leftover replay folders and find the one that was last modified closest to the ANR and take it as the previous replayreplayIdback to the disk cache, so laterReplayIntegrationcan pick it up and finalize and send it. The order will be ensured by an integration testsendReplayForEventtocaptureReplaywhich just accept one argument now to define whether the app process is terminating or not. If it is, then we don't capture the buffered replay in the current process, but will capture it on next launch, to avoid weird issues with half-captured videoscreateSegmentmethod and moved it to a static method underCaptureStrategyso we could call it fromReplayIntegrationas well💡 Motivation and Context
Part of getsentry/sentry#74441
💚 How did you test it?
manually + automated
📝 Checklist
sendDefaultPIIis enabled.