-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
ref(replays): Clean up RRWeb event parsing logic #93517
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
ref(replays): Clean up RRWeb event parsing logic #93517
Conversation
…mbs.py Co-authored-by: Andrew Liu <[email protected]>
Codecov ReportAttention: Patch coverage is ✅ All tests successful. No failed tests found.
Additional details and impacted files@@ Coverage Diff @@
## master #93517 +/- ##
==========================================
- Coverage 88.02% 88.02% -0.01%
==========================================
Files 10331 10329 -2
Lines 596378 596143 -235
Branches 23160 23107 -53
==========================================
- Hits 524976 524737 -239
- Misses 70946 70957 +11
+ Partials 456 449 -7 |
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.
For reference, here are the types as defined by the SDK: https://github.com/getsentry/sentry-javascript/blob/1ef780751a3fd895ada82164344e1aa7e9e0acb0/packages/replay-internal/src/types/replayFrame.ts
As we mess around with extracting data from RRWeb we need more robust methods of handling the data. The previous code was adhoc and was breakable given a sufficiently motivated person wanted to break it. It didn't break because the SDK has a limited range of event-formats it provides but that does not imply that no one could send bad events in the future. We naively parse the events and if parsing fails we handled the exception. --------- Co-authored-by: Andrew Liu <[email protected]>
As we mess around with extracting data from RRWeb we need more robust methods of handling the data. The previous code was adhoc and was breakable given a sufficiently motivated person wanted to break it. It didn't break because the SDK has a limited range of event-formats it provides but that does not imply that no one could send bad events in the future.
We naively parse the events and if parsing fails we handled the exception.