Skip to content

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

Merged
merged 36 commits into from
Jun 18, 2025

Conversation

cmanallen
Copy link
Member

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.

@cmanallen cmanallen requested a review from a team as a code owner June 13, 2025 16:01
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Jun 13, 2025
Copy link

codecov bot commented Jun 13, 2025

Codecov Report

Attention: Patch coverage is 91.34615% with 18 lines in your changes missing coverage. Please review.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/sentry/replays/usecases/ingest/event_parser.py 89.02% 18 Missing ⚠️
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     

@michellewzhang michellewzhang requested a review from billyvg June 13, 2025 21:11
@cmanallen cmanallen requested a review from aliu39 June 16, 2025 18:46
Copy link
Member

@billyvg billyvg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cmanallen cmanallen merged commit c153061 into master Jun 18, 2025
62 of 64 checks passed
@cmanallen cmanallen deleted the cmanallen/replays-use-new-event-parser-functions branch June 18, 2025 14:06
andrewshie-sentry pushed a commit that referenced this pull request Jun 19, 2025
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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Scope: Backend Automatically applied to PRs that change backend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants