sentry-java
sentry-java copied to clipboard
[SR] Capture gestures/motion events
#skip-changelog
:scroll: Description
- Adds touch event interceptor to
WindowRecorder - Converts those to RRWebIncrementalSnapshotEvents
- For up/down events we convert to
MouseInteractionsource with typeTouchStart/TouchCancel/TouchEnd - For move events we convert to
TouchMovesource with a list of positions
- For up/down events we convert to
- We also debounce/throttle only move events every 200ms as those can be overwhelming. For up/down/cancel we don't throttle as those are indicating start/end of gesture and are important to capture
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
:bulb: Motivation and Context
Part of https://github.com/getsentry/sentry/issues/63255
Performance metrics :rocket:
| 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 |
|---|---|---|---|
| c5a385cec75ba0da0efd0706a5e0db210af4b4d6 | 371.06 ms | 433.14 ms | 62.08 ms |
| 0a9348efe344013322e89f4dd18d8d2dd9e2d96d | 330.94 ms | 405.53 ms | 74.59 ms |
| 51792bd4da38718688f5dcf54d5e30c22d1a7856 | 461.35 ms | 479.57 ms | 18.22 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| c5a385cec75ba0da0efd0706a5e0db210af4b4d6 | 1.70 MiB | 2.33 MiB | 638.75 KiB |
| 0a9348efe344013322e89f4dd18d8d2dd9e2d96d | 1.70 MiB | 2.32 MiB | 638.56 KiB |
| 51792bd4da38718688f5dcf54d5e30c22d1a7856 | 1.70 MiB | 2.33 MiB | 640.05 KiB |