Title: Incorrect app start transaction duration when app goes in sleep · Issue #5752 · getsentry/sentry-java · GitHub
Open Graph Title: Incorrect app start transaction duration when app goes in sleep · Issue #5752 · getsentry/sentry-java
X Title: Incorrect app start transaction duration when app goes in sleep · Issue #5752 · getsentry/sentry-java
Description: As reported by a customer we're seeing the following behavior: App is launched A cold start is detected and an ui.load transaction is created (app.start.cold + ttid) The app is backgrounded before the first frame draws (and the activity ...
Open Graph Description: As reported by a customer we're seeing the following behavior: App is launched A cold start is detected and an ui.load transaction is created (app.start.cold + ttid) The app is backgrounded before ...
X Description: As reported by a customer we're seeing the following behavior: App is launched A cold start is detected and an ui.load transaction is created (app.start.cold + ttid) The app is backgrounded bef...
Opengraph URL: https://github.com/getsentry/sentry-java/issues/5752
X: @github
Domain: github.com
IPv4 address: 140.82.114.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Incorrect app start transaction duration when app goes in sleep","articleBody":"As reported by a customer we're seeing the following behavior:\n\n1. App is launched\n2. A cold start is detected and an `ui.load` transaction is created (`app.start.cold` + `ttid`)\n3. The app is backgrounded before the first frame draws (and the activity only progresses through the `onCreate` + `onStart` phases, no `onDestroy`) — so TTID never happens, and no lifecycle cleanup on our side runs.\n4. The device enters Doze, which freezes our deadline timer so it doesn't fire at +30s.\n5. Hours later the device wakes up, the deadline finally fires when the app is resumed, and our `forceFinish` stamps the spans with the current time.\n6. The resulting transactions spans over multiple hours.\n\nI would argue that we should drop any foreground launches which have a doze in-between, as it just skews the real \"user perceived\" launches.\n\nOn the other hand, a real user was probably waiting for a few seconds for the app to come alive, but it didn't, so the user bailed.\n\nRelated issue: getsentry/sentry-java#5530\n\n## Decision (2026-11-12)\n\nFiltering on `span.status:ok` doesn't remove these transactions. After the device wakes from Doze, or the process is thawed by the cached apps freezer, the overdue deadline timer races the first frame:\n\n* Timer first: everything ends `deadline_exceeded`, but at the wake time, so it's hours long.\n* First frame first: TTID and app start are measured from the Activity's start, and the idle timeout finishes the transaction as `ok`.\n\nIn one customer's data, most `ui.load` transactions over 60s were `ok` with this signature.\n\nThe fix goes on main and changes no timings: every timestamp, duration and measurement stays as it is. It measures the deadline with a `Deadline` on the boottime ticker, which counts deep sleep. Once that has passed, the transaction and every span that finishes after it get `deadline_exceeded`, the status the deadline timer already gives. So `span.status:ok` filters these transactions out, whichever path finishes them. The timer stays, so an awake device still ends on time. #5755 (closed) tried dropping late transactions instead.\n\nSide effect: the extended app start vital is skipped when its span ends after the deadline, because `AppStartExtension` ignores `deadline_exceeded` spans.","author":{"url":"https://github.com/markushi","@type":"Person","name":"markushi"},"datePublished":"2026-07-10T08:45:18Z","url":"https://github.com/getsentry/sentry-java/issues/5752"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:1edbde51-261b-839a-53e5-166160fb50db |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BBFA:25E63A:27CBA:37FD8:6B04613D |
| html-safe-nonce | 5c457f918291d69b782028e272bac7bbe0c5240ff4ac7c76ab8d2a743e396083 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCQkZBOjI1RTYzQToyN0NCQTozN0ZEODo2QjA0NjEzRCIsInZpc2l0b3JfaWQiOiI4NTM4MTg3NTQ3OTEyOTg2OTQxIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 285fd810002d319b50297722b279cfd7044ab89453fb623bf72b05069deb9ae5 |
| hovercard-subject-tag | issue:4853487885 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/getsentry/sentry-java/5752/issue_layout |
| twitter:image | https://opengraph.githubassets.com/5f32c6774e68b929471f13f3a5b03f62bcf83885dad1616f3a97a98d141e44e0/getsentry/sentry-java/issues/5752 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/5f32c6774e68b929471f13f3a5b03f62bcf83885dad1616f3a97a98d141e44e0/getsentry/sentry-java/issues/5752 |
| og:image:alt | As reported by a customer we're seeing the following behavior: App is launched A cold start is detected and an ui.load transaction is created (app.start.cold + ttid) The app is backgrounded before ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | markushi |
| hostname | github.com |
| expected-hostname | github.com |
| None | 2d58451b4bcb73c33c67bfb6b28fb75fe6d5e279daf9b560fa4fd832f3d8c9a6 |
| turbo-cache-control | no-preview |
| go-import | github.com/getsentry/sentry-java git https://github.com/getsentry/sentry-java.git |
| octolytics-dimension-user_id | 1396951 |
| octolytics-dimension-user_login | getsentry |
| octolytics-dimension-repository_id | 3368190 |
| octolytics-dimension-repository_nwo | getsentry/sentry-java |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 3368190 |
| octolytics-dimension-repository_network_root_nwo | getsentry/sentry-java |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 03e114520787ad27289207f153520ef97461127c |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width