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 23b4b90
Browse filesBrowse the repository at this point in the historyBrowse files
authored
fix(core): Mark transactions that outlive their deadline as deadline_exceeded (JAVA-642) (#6599)
* fix(core): End transactions at the deadline after the device sleeps (JAVA-642)
The deadline timer counts on System.nanoTime(), which stops while an
Android device is suspended. It ran hours late, and after a process
freeze it raced the main thread, so ui.load transactions ended hours
after the deadline, or measured TTID, TTFD and the app start to a late
frame and finished as ok.
SentryTracer now measures the deadline on the monotonic ticker, which
counts suspend, and ends the transaction and its open spans at the wall
time the deadline was reached. Once it has passed, every way of
finishing the transaction takes that outcome. ActivityLifecycleIntegration
applies it before handling a late first frame, full display or destroy,
and PerformanceAndroidEventProcessor adds no app start measurement when
the app start span was cut short.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* changelog
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* ref(core): Return a no-op span after the deadline without finishing
Starting a span after the deadline finished and captured the whole
transaction on the thread that started the span, which may hold a lock.
Return the no-op span only: the overdue deadline timer ends the
transaction at the deadline right after.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(core): Change only the status of spans that finish after the deadline
Timings now stay exactly as before: the deadline timer ends spans at
now() again, spans started after the deadline are recorded, and the
ActivityLifecycleIntegration and PerformanceAndroidEventProcessor
changes are reverted.
Instead, once the monotonic-ticker deadline has passed, Span.finish
gives the transaction and any span that finishes after it the status
the deadline timer gives: the transaction's own status, or
DEADLINE_EXCEEDED. Late frames after a device sleep then no longer
report ok, so span.status:ok filters them out.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* changelog
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* ref(core): Return the deadline status only after the deadline passed
getDeadlineStatus() was only correct after a hasDeadlinePassed() check.
Fold the check in, so getDeadlineExceededStatus() returns null until the
deadline passes, and keep the timer callback as it is on main.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com>
Co-authored-by: Markus Hintersteiner <markus.hintersteiner@sentry.io>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,6 +26,7 @@
26
26
- Session Replay: Send Ktor client network request start and end times in milliseconds, so the requests line up with the replay ([#6619](https://github.com/getsentry/sentry-java/pull/6619))
27
27
- Nav3: Stop attributing errors and spans from an Activity or ViewPager2 page without a `SentryNavEffect` to the most recently visited Nav3 root ([#6483](https://github.com/getsentry/sentry-java/pull/6483))
28
28
- Android: Count deep sleep in breadcrumb, screenshot and view hierarchy debounce windows, so the first low-memory or battery breadcrumb after a long Doze is no longer dropped ([#6590](https://github.com/getsentry/sentry-java/pull/6590))
29
+
- Android: Mark transactions and spans that finish after their deadline as `deadline_exceeded`, so `ui.load` transactions with TTID, TTFD or app start values that are hours long after a device sleep no longer report `ok` ([#6599](https://github.com/getsentry/sentry-java/pull/6599))
29
30
- Android: Register network callbacks on API 24–25 when `AndroidConnectionStatusProvider` is created with a custom `Handler`, instead of failing because the `Handler` overload needs API 26 ([#6634](https://github.com/getsentry/sentry-java/pull/6634))
0 commit comments