-
-
Notifications
You must be signed in to change notification settings - Fork 435
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SR] Introduce capture strategies and handle orientation change for buffer #3357
[SR] Introduce capture strategies and handle orientation change for buffer #3357
Conversation
Performance metrics 🚀
|
Revision | Plain | With Sentry | Diff |
---|---|---|---|
4905abb | 394.22 ms | 532.53 ms | 138.31 ms |
9576d82 | 413.17 ms | 484.73 ms | 71.56 ms |
54ce31d | 356.89 ms | 426.10 ms | 69.21 ms |
8e7260f | 367.84 ms | 445.06 ms | 77.22 ms |
App size
Revision | Plain | With Sentry | Diff |
---|---|---|---|
4905abb | 1.70 MiB | 2.31 MiB | 627.54 KiB |
9576d82 | 1.70 MiB | 2.31 MiB | 627.54 KiB |
54ce31d | 1.70 MiB | 2.31 MiB | 627.54 KiB |
8e7260f | 1.70 MiB | 2.31 MiB | 627.54 KiB |
} | ||
} | ||
|
||
protected sealed class ReplaySegment { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice!
) | ||
if (segment is ReplaySegment.Created) { | ||
segment.capture(hub) | ||
currentSegment.getAndIncrement() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in case segment creation fails, would you need to increment currentSegment.getAndIncrement()
as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no, I think we'd want to try and capture the next time with the same segmentId to avoid gaps. That's a good point for future though, as we could create an rrweb_event indicating the failure and reflect the gap somehow on the playback. I'll add this to ideas list 👍
#skip-changelog
📜 Description
buffer
mode - we capture segments whenever orientation change happens and keep them in memory until an error happens. We also rotate already captured segments when necessarysession
mode - if a fatal crash happens, we try to capture the current segment to send as complete replay as possible💡 Motivation and Context
Part of getsentry/sentry#63255