Skip to content
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] Capture gestures/motion events #3390

Merged
merged 12 commits into from
May 29, 2024

Conversation

romtsn
Copy link
Member

@romtsn romtsn commented Apr 25, 2024

#skip-changelog

📜 Description

  • Adds touch event interceptor to WindowRecorder
  • Converts those to RRWebIncrementalSnapshotEvents
    • For up/down events we convert to MouseInteraction source with type TouchStart/TouchCancel/TouchEnd
    • For move events we convert to TouchMove source with a list of positions
  • We also debounce/throttle only move events every 50ms as those can be overwhelming and capture them every 500ms (same as rrweb doing for web). For up/down/cancel we don't throttle as those are indicating start/end of gesture and are important to capture.
  • Fixed MapObjectReader along the way again, as it wasn't handling properly collections with deserializers

Here's an example event but playback not yet working: https://sentry-sdks.sentry.io/replays/d297a781640d4f8f966dd0cba27cf142/?project=5428559&query=&referrer=%2Freplays%2F%3AreplaySlug%2F&statsPeriod=1h&t_main=breadcrumbs&yAxis=count%28%29&t=0

💡 Motivation and Context

Part of getsentry/sentry#70065

Copy link
Contributor

github-actions bot commented Apr 25, 2024

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 385.71 ms 479.43 ms 93.72 ms
Size 1.70 MiB 2.33 MiB 639.82 KiB

Previous results on branch: rz/feat/session-replay-touch-events

Startup times

Revision Plain With Sentry Diff
c5a385c 371.06 ms 433.14 ms 62.08 ms
0a9348e 330.94 ms 405.53 ms 74.59 ms
51792bd 461.35 ms 479.57 ms 18.22 ms

App size

Revision Plain With Sentry Diff
c5a385c 1.70 MiB 2.33 MiB 638.75 KiB
0a9348e 1.70 MiB 2.32 MiB 638.56 KiB
51792bd 1.70 MiB 2.33 MiB 640.05 KiB

@romtsn romtsn marked this pull request as ready for review May 6, 2024 11:20
@romtsn romtsn merged commit 0af0984 into rz/feat/session-replay May 29, 2024
19 of 20 checks passed
@romtsn romtsn deleted the rz/feat/session-replay-touch-events branch May 29, 2024 11:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants