@@ -265,10 +265,8 @@ private void startTracing(final @NotNull Activity activity) {
265265 transactionOptions .setAppStartTransaction (appStartSamplingDecision != null );
266266 setSpanOrigin (transactionOptions );
267267
268- // An extend-app-start transaction (Sentry.extendAppStart) is already open. Reuse its trace
269- // for this ui.load instead of creating a second app.start. It also stores an app-start
270- // trace id, so the headless-start check below is guarded with !extensionActive to avoid
271- // mistaking it for a finished headless start.
268+ // Guards the headless-start check below with !extensionActive so the eager extension's
269+ // stored trace id isn't mistaken for a finished headless start.
272270 final boolean extensionActive =
273271 AppStartMetrics .getInstance ().getAppStartExtension ().isActive ();
274272
@@ -279,8 +277,6 @@ private void startTracing(final @NotNull Activity activity) {
279277
280278 final boolean isAppStart =
281279 !(firstActivityCreated || appStartTime == null || coldStart == null );
282- // Foreground starts create app.start first; ui.load then shares its trace. When the app
283- // start is being extended, the eager app.start txn already exists, so we continue it.
284280 final boolean createStandaloneAppStart =
285281 isAppStart
286282 && options .isEnableStandaloneAppStartTracing ()
@@ -326,9 +322,8 @@ private void startTracing(final @NotNull Activity activity) {
326322 }
327323
328324 if (extensionActive && isAppStart ) {
329- // Attach only the launch activity's screen so a later activity can't overwrite it.
330- // Without
331- // a screen the processor would classify the eager app.start as a headless start.
325+ // Only the launch activity sets the screen, so a later activity can't overwrite it. A
326+ // screen also keeps the processor from classifying the eager app.start as headless.
332327 AppStartMetrics .getInstance ()
333328 .getAppStartExtension ()
334329 .setData (APP_START_SCREEN_DATA , activityName );
0 commit comments