Repository navigation
feat(session-replay): add user input events to replay recordings - #2288
Merged
Merged
Conversation
Reads the optional inputEvents array from the replay sidecar, keeps the events that fall inside the clip, rebases their timestamps (ms since the first video frame) onto the replay start, and merges them with the breadcrumb events in timestamp order.
|
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #2288 +/- ##
==========================================
+ Coverage 75.62% 75.67% +0.05%
==========================================
Files 104 104
Lines 28397 28439 +42
Branches 5213 5220 +7
==========================================
+ Hits 21476 21522 +46
+ Misses 5575 5558 -17
- Partials 1346 1359 +13 🚀 New features to boost your workflow:
|
tustanivsky
marked this pull request as ready for review
November 9, 2026 12:23
tustanivsky
requested review from
JoshuaMoelans,
jpnurmi and
mujacica
and removed request for
jpnurmi
November 9, 2026 12:55
jpnurmi
reviewed
Nov 9, 2026
jpnurmi
approved these changes
Nov 9, 2026
JoshuaMoelans
approved these changes
Nov 9, 2026
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.
This PR lets SDKs embedding sentry-native add user input (mouse moves, clicks, touches) to session replays, so the replay player shows it on top of the video as it does for the web and mobile SDKs.
The replay sidecar may now carry an optional
inputEventsarray of rrweb events whosetimestampis in milliseconds since the first video frame.sentry__session_replay_flush_pendingembeds them into thereplay_recordingpayload next to the breadcrumb events.Key changes
append_input_eventskeeps the object entries ofinputEventsthat fall inside the clip (0 <= timestamp <= durationMs) and moves theirtimestamponto the replay start (start_sec), so they stay in sync with the video. The events are otherwise passed through unchanged: the SDK doesn't read their type or data, so new rrweb event kinds need no SDK change.inputEventsproduce the same recording as before.Testing
stage_replayadds input events to the staged sidecar: two inside the clip, one past its end. The shared replay-envelope assertion checks that only the two inside the clip are embedded, moved onto the replay start, and in timestamp order next to the breadcrumbs. This covers the existing replay integration tests for the crashpad, breakpad, inproc and native daemon backends.Related Items