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 a9e53be
Browse filesBrowse the repository at this point in the historyBrowse files
authored
fix(android): Read the app start type once per event processor pass (#6006)
* fix(android): Read the app start type once per event processor pass
PerformanceAndroidEventProcessor read AppStartMetrics.getAppStartType()
three separate times while building a single transaction: once for the
measurement key, once to decide whether to attach the cold-start
breakdown children, and once for contexts.app.start_type, which is also
what is now stamped on the trace context and every child span as
app.vitals.start.type.
The field is written on the main thread (activity lifecycle callbacks,
ApplicationStartInfo) while the processor runs on whichever thread
finished the transaction, which can be the Sentry timer thread for idle
and deadline timeouts. Backgrounding the app flips the type to WARM in
onActivityDestroyed, so the reads can disagree and ship a transaction
whose measurement says app_start_cold while every span says
app.vitals.start.type = warm.
Snapshot the type once at the top of process() and pass it down, and
make the field volatile so the read is not a data race.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
* changelog
---------
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Co-authored-by: Markus Hintersteiner <markus.hintersteiner@sentry.io>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,6 @@
6
6
7
7
- Add `Session.State.Unhandled` for unhandled errors that do not terminate the process ([#5919](https://github.com/getsentry/sentry-java/pull/5919))
8
8
9
-
10
9
### Improvements
11
10
12
11
- Emit a single `ui.compose` span per `SentryTraced` on initial composition instead of one on every recomposition, and set the origin on `ui.render` spans ([#6051](https://github.com/getsentry/sentry-java/pull/6051))
@@ -22,6 +21,7 @@
22
21
- `Sentry.pushScope`, `Sentry.pushIsolationScope` and `Sentry.popScope` remain no-ops when `globalHubMode` is enabled
23
22
- Drop the `profiler_id` from transactions and spans when no Perfetto profile covers them, e.g. when Android's `ProfilingManager` rate limits the profiling request ([#6015](https://github.com/getsentry/sentry-java/pull/6015))
24
23
- Prevent events from being dropped when feature flags are added while an event is being captured ([#5989](https://github.com/getsentry/sentry-java/pull/5989))
24
+
- Report a consistent app start type across the app start measurement, `contexts.app` and the `app.start` span attributes ([#6006](https://github.com/getsentry/sentry-java/pull/6006))
0 commit comments