Skip to content

Session Replay gesture batching measures durations with the wall clock #6523

Closed

Description

@runningcode

Split from #6522. These two pieces measure how long something took, so they can move to a Stopwatch before v9. Check-in durations did the same in #6032. The gesture timestamps (when something happened) stay on the wall clock and are part of #6522, which waits for v9.

What reads the wall clock

While a finger moves, ReplayGestureConverter batches touch positions and sends them as one move event every 500ms. Two things there subtract one wall-clock reading from another:

  • Batch timer. The batch is sent once now - touchMoveBaseline passes 500ms. This only decides when to send, so nothing in the payload changes. It's the sibling of the 50ms move debounce that fix(replay): Measure recording deadlines on a monotonic clock (JAVA-575) #6090 moved to a Deadline.
  • timeOffset. Each position records how long after the batch started it happened, always under about 500ms. It is sent to Sentry, but it's a duration, not a timestamp.

What goes wrong

If the clock steps backward during a swipe, now - touchMoveBaseline goes negative. The batch isn't sent until the clock catches back up, and if the finger lifts first, the batched positions are dropped. A forward step sends the batch at once, with offsets stretched by the size of the step.

Not a breaking change

With no clock step, the values are the same as today. It doesn't touch session counts, the public API or a critical customer metric.

Done when

Agent notes

Verified on main at 5652060246 (2026-11-09).

Activity

  1. self-assigned this
    on Nov 9, 2026
  2. linear-code commented on Nov 9, 2026

    @linear-code
  3. github-actions commented on Nov 11, 2026

    @github-actions
    Contributor

    A PR closing this issue has just been released 🚀

    This issue was referenced by PR #6538, which was included in the 8.64.0 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions