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 a5d3cf6
Browse filesBrowse the repository at this point in the historyBrowse files
fix(android): Don't block the main thread on the frame metrics looper (#6500)
* fix(android): Don't block the main thread on the frame metrics looper
SentryFrameMetricsCollector waited on HandlerThread.getLooper() at the first
startCollection(), blocking Activity.onCreate for hundreds of ms on a busy device.
Create the handler in onLooperPrepared() instead, and start the thread at init when
frames tracking will use it, so its looper is ready before the first frame.
Fixes#6443
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* changelog
* fix(android): Read the current frame metrics window once per check
trackCurrentWindow() now also runs on the HandlerThread in onLooperPrepared(). Reading
the volatile currentWindow twice could NPE if onActivityStopped nulled it in between,
killing the thread before Looper.loop() and silently stopping frame metrics.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,6 +25,8 @@
25
25
- Session Replay: Fix `SentryOkHttpInterceptor` hanging forever on responses whose body has no known length, such as Server-Sent Events or a gzipped response, when network details are enabled for the URL ([#6231](https://github.com/getsentry/sentry-java/pull/6231))
26
26
- Session Replay: `SentryOkHttpInterceptor` now captures network request and response details only while Session Replay is recording or buffering ([#6486](https://github.com/getsentry/sentry-java/pull/6486))
27
27
- Stop marking an OkHttp call span as failed when a connection attempt to one of the host's addresses fails but OkHttp connects on another ([#6472](https://github.com/getsentry/sentry-java/pull/6472))
28
+
- Stop blocking the main thread while the frame metrics thread starts when the first activity transaction begins ([#6500](https://github.com/getsentry/sentry-java/pull/6500))
29
+
- On a busy device during cold start this could stall the launcher activity's `onCreate` for hundreds of milliseconds.
0 commit comments