You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 3cf91ba
Browse filesBrowse the repository at this point in the historyBrowse files
fix(replay): Measure recording deadlines on a monotonic clock (JAVA-575) (#6090)
* fix(replay): Measure recording deadlines on a monotonic clock (JAVA-575)
Session Replay derives every interval from the wall clock. Two of those
intervals are pure control flow, and a clock step corrupts both:
- The 1h `sessionDuration` cap was `frameTimestamp - replayStartTimestamp`.
A forward step past the cap kills a healthy recording on the next frame;
a backward step lets one run indefinitely.
- The 50ms ACTION_MOVE debounce was `lastCapturedMoveEvent + 50 > now`.
A backward step suppresses every move event until the wall clock catches
back up.
Both now use `io.sentry.time.Deadline` on the options' `MonotonicTicker`,
which is `SystemClock.elapsedRealtimeNanos()` on Android. That clock
advances across device suspend just as the wall clock does, so the
conversion preserves today's semantics and only removes the step.
The cap is still evaluated when a frame is captured rather than when its
queued task runs, so a busy replay executor cannot trip it.
Everything else JAVA-575 lists — segment timestamps and durations, frame
filenames, buffer cutoffs, gesture `timeOffset`s — stays on the wall clock:
those values are serialized, and fixing them means re-basing them onto an
`AnchoredClock`, which is a v9 change. `// TODO [MAJOR]` markers record that
at both `ICurrentDateProvider` injection sites.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* changelog
* ref(replay): Trim the v9 AnchoredClock TODOs
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* test(replay): Advance the ticker during the executor delay
The executor-delay test only moved the wall clock while the frame task
was queued, so it no longer guarded the 1h cap once that cap moved onto
the monotonic ticker: checking the deadline inside the task would still
pass. Advancing the ticker as well makes it fail on that regression.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* ref(replay): Suppress detekt size checks on the capture strategies
The monotonic ticker brings the capture-strategy constructors to seven
parameters now that main injects a persisting executor, and the
executor-delay ticker advance tips SessionCaptureStrategyTest over the
LargeClass threshold.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+6Lines changed: 6 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,11 @@
1
1
# Changelog
2
2
3
+
## Unreleased
4
+
5
+
### Fixes
6
+
7
+
- Measure Session Replay's 1h recording cap and its touch-move debounce on a monotonic clock, so a device time change no longer stops a healthy recording early, keeps a finished one alive, or suppresses gesture events ([#6090](https://github.com/getsentry/sentry-java/pull/6090))
0 commit comments