Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
94 commits
Select commit Hold shift + click to select a range
7a7d63f
feat(extend-app-start): Add IAppStartExtender bridge and SentryOptionโ€ฆ
buenaflor Jun 23, 2026
313fff1
chore(extend-app-start): Annotate NoOpAppStartExtender internal and fโ€ฆ
buenaflor Jun 23, 2026
540931a
refactor(extend-app-start): Rename finishAppStart to finishExtendedApโ€ฆ
buenaflor Jun 25, 2026
7dfe617
feat(extend-app-start): Extract AppStartExtension component for the Aโ€ฆ
buenaflor Jun 23, 2026
4d0c97d
refactor(extend-app-start): Inject logger into AppStartExtension instโ€ฆ
buenaflor Jun 25, 2026
b5ac7f5
refactor(extend-app-start): Return ExtendedAppStart from the listenerโ€ฆ
buenaflor Jun 25, 2026
81efded
chore(extend-app-start): Remove redundant comments and rename reset tโ€ฆ
buenaflor Jun 25, 2026
3cc743e
refactor(extend-app-start): Inline the logger lookup instead of injecโ€ฆ
buenaflor Jun 25, 2026
1dafb9b
chore(extend-app-start): Drop the class and listener javadocs on AppSโ€ฆ
buenaflor Jun 25, 2026
8548b4d
chore(extend-app-start): Trim finishTransaction/getExtendedEndTime coโ€ฆ
buenaflor Jun 25, 2026
01b1dc4
refactor(extend-app-start): Rename AppStartExtension.finishAppStart tโ€ฆ
buenaflor Jun 25, 2026
d996425
feat(extend-app-start): Eagerly create the extended App Start transacโ€ฆ
buenaflor Jun 24, 2026
4349a42
feat(extend-app-start): Add public Sentry app start extension API
buenaflor Jun 25, 2026
51e4969
chore(extend-app-start): Drop the redundant foreground-check comment โ€ฆ
buenaflor Jun 25, 2026
4c1f0d7
test(extend-app-start): Replace the no-op finish test with isExtendedโ€ฆ
buenaflor Jun 25, 2026
48bb3a1
test(extend-app-start): Drop the no-value getAppStartExtension test aโ€ฆ
buenaflor Jun 25, 2026
05a9df2
chore(extend-app-start): Drop the redundant foreground-check comment โ€ฆ
buenaflor Jun 25, 2026
5830303
test(extend-app-start): Drop the no-value getAppStartExtension test aโ€ฆ
buenaflor Jun 25, 2026
ec4da6c
test(extend-app-start): Drop the no-op finishExtendedAppStart test
buenaflor Jun 25, 2026
9fa64fd
Merge branch 'feat/app-start-extension-android' into feat/app-start-eโ€ฆ
buenaflor Jun 25, 2026
2e102d1
Merge branch 'feat/app-start-extension-materialize' into feat/app-staโ€ฆ
buenaflor Jun 25, 2026
38f83e1
chore(extend-app-start): Trim and de-duplicate comments in the eager โ€ฆ
buenaflor Jun 25, 2026
79a77d1
Merge branch 'feat/app-start-extension-materialize' into feat/app-staโ€ฆ
buenaflor Jun 25, 2026
55decba
chore(extend-app-start): Clarify the extensionActive comment
buenaflor Jun 25, 2026
d72cf0f
Merge branch 'feat/app-start-extension-materialize' into feat/app-staโ€ฆ
buenaflor Jun 25, 2026
0a167ee
feat(extend-app-start): Show extending the app start in the Android sโ€ฆ
buenaflor Jun 25, 2026
d2c16a2
fix(extend-app-start): Read the extended span finish date, not its fiโ€ฆ
buenaflor Jun 25, 2026
f0a85b0
Merge branch 'feat/app-start-extension-android' into feat/app-start-eโ€ฆ
buenaflor Jun 25, 2026
6ca5f2b
Merge branch 'feat/app-start-extension-materialize' into feat/app-staโ€ฆ
buenaflor Jun 25, 2026
b6dd76e
fix(extend-app-start): End the extended transaction at the extended sโ€ฆ
buenaflor Jun 25, 2026
66cd87d
Merge branch 'feat/app-start-extension-android' into feat/app-start-eโ€ฆ
buenaflor Jun 25, 2026
b1cc115
Merge branch 'feat/app-start-extension-materialize' into feat/app-staโ€ฆ
buenaflor Jun 25, 2026
571416e
ref(extend-app-start): Rename extended app start span op to app.startโ€ฆ
buenaflor Jun 25, 2026
caa7945
Merge branch 'feat/app-start-extension-materialize' into feat/app-staโ€ฆ
buenaflor Jun 25, 2026
ff8c056
fix(extend-app-start): Guard extendAppStartListener with the lock
buenaflor Jun 26, 2026
b4f34ce
Merge branch 'feat/app-start-extension-android' into feat/app-start-eโ€ฆ
buenaflor Jun 26, 2026
d480039
Merge branch 'feat/app-start-extension-materialize' into feat/app-staโ€ฆ
buenaflor Jun 26, 2026
1eb12d5
fix(extend-app-start): Fix headless app start end time and duplicate txn
buenaflor Jun 26, 2026
7f41597
Merge branch 'feat/app-start-extension-materialize' into feat/app-staโ€ฆ
buenaflor Jun 26, 2026
b5bf4ec
style(extend-app-start): Trim low-value comments in the headless fix
buenaflor Jun 26, 2026
c94e761
Merge branch 'feat/app-start-extension-materialize' into feat/app-staโ€ฆ
buenaflor Jun 26, 2026
bb88dad
style(extend-app-start): Drop redundant extend-listener comment
buenaflor Jun 26, 2026
f4756cb
Merge branch 'feat/app-start-extension-materialize' into feat/app-staโ€ฆ
buenaflor Jun 26, 2026
85e23d8
style(extend-app-start): Trim redundant comments in onActivityCreated
buenaflor Jun 26, 2026
ef85bb6
Merge branch 'feat/app-start-extension-materialize' into feat/app-staโ€ฆ
buenaflor Jun 26, 2026
f2d1c34
style(extend-app-start): Remove explanatory comments in app start paths
buenaflor Jun 26, 2026
ca33abd
Merge branch 'feat/app-start-extension-materialize' into feat/app-staโ€ฆ
buenaflor Jun 26, 2026
d2df48b
fix(extend-app-start): Consume stored app start trace on the extensioโ€ฆ
buenaflor Jun 26, 2026
5207bb6
Merge branch 'feat/app-start-extension-materialize' into feat/app-staโ€ฆ
buenaflor Jun 26, 2026
142a9d2
fix(extend-app-start): Only the launch activity attaches the app starโ€ฆ
buenaflor Jun 26, 2026
21a6103
Merge branch 'feat/app-start-extension-materialize' into feat/app-staโ€ฆ
buenaflor Jun 26, 2026
dd7b3e0
Format code
getsentry-bot Jun 26, 2026
0c27a47
Format code
getsentry-bot Jun 26, 2026
e26ee97
style(extend-app-start): Trim verbose finishTransaction comment
buenaflor Jun 26, 2026
b7da10f
Merge branch 'feat/app-start-extension-android' into feat/app-start-eโ€ฆ
buenaflor Jun 26, 2026
0de722b
style(extend-app-start): Trim verbose comments in app start paths
buenaflor Jun 26, 2026
c2cdb14
Merge remote-tracking branch 'origin/feat/app-start-extension-materiaโ€ฆ
buenaflor Jun 26, 2026
3476145
Merge branch 'feat/app-start-extension-materialize' into feat/app-staโ€ฆ
buenaflor Jun 26, 2026
83e2058
fix(extend-app-start): Read finish date in getExtendedAppStartSpan
buenaflor Jun 29, 2026
2a02616
Merge branch 'feat/app-start-extension-android' into feat/app-start-eโ€ฆ
buenaflor Jun 29, 2026
ff1a826
Merge branch 'feat/app-start-extension-materialize' into feat/app-staโ€ฆ
buenaflor Jun 29, 2026
53cf7db
style(extend-app-start): Trim duplicated reentrancy comment in getExtโ€ฆ
buenaflor Jun 29, 2026
11d704d
style(extend-app-start): Keep trimmed reentrancy comment within line โ€ฆ
buenaflor Jun 29, 2026
df8cfe4
Merge branch 'feat/app-start-extension-android' into feat/app-start-eโ€ฆ
buenaflor Jun 29, 2026
b442c1e
style(extend-app-start): Drop two line-narrating test comments
buenaflor Jun 29, 2026
1138f81
Merge branch 'feat/app-start-extension-materialize' into feat/app-staโ€ฆ
buenaflor Jun 29, 2026
dc76d9a
style(extend-app-start): Reword getExtendedAppStartSpan reentrancy coโ€ฆ
buenaflor Jun 29, 2026
642cfb0
Merge branch 'feat/app-start-extension-android' into feat/app-start-eโ€ฆ
buenaflor Jun 29, 2026
8e4fa7c
Merge branch 'feat/app-start-extension-materialize' into feat/app-staโ€ฆ
buenaflor Jun 29, 2026
33a6aa0
refactor(extend-app-start): Rename isAppStartWindowOpen to canExtendAโ€ฆ
buenaflor Jun 29, 2026
e12f7b0
Merge branch 'feat/app-start-extension-android' into feat/app-start-eโ€ฆ
buenaflor Jun 29, 2026
4a16c4a
Merge branch 'feat/app-start-extension-materialize' into feat/app-staโ€ฆ
buenaflor Jun 29, 2026
210b4ee
test(extend-app-start): Drop redundant getExtendedAppStartSpan finishโ€ฆ
buenaflor Jun 29, 2026
9ebdd09
Merge branch 'feat/app-start-extension-android' into feat/app-start-eโ€ฆ
buenaflor Jun 29, 2026
7aadcb9
Merge branch 'feat/app-start-extension-materialize' into feat/app-staโ€ฆ
buenaflor Jun 29, 2026
824c12f
test(extend-app-start): Drop narrating comments from app start tests
buenaflor Jun 29, 2026
cee0b84
Merge branch 'feat/app-start-extension-materialize' into feat/app-staโ€ฆ
buenaflor Jun 29, 2026
bdadd2b
feat(extend-app-start): Add setData and isExtended to AppStartExtension
buenaflor Jun 29, 2026
d87e908
Merge branch 'feat/app-start-extension-android' into feat/app-start-eโ€ฆ
buenaflor Jun 29, 2026
45472ea
Merge branch 'feat/app-start-extension-materialize' into feat/app-staโ€ฆ
buenaflor Jun 29, 2026
c861ba9
refactor(extend-app-start): Name app start branching booleans by intent
buenaflor Jun 29, 2026
b11b0fa
fix(extend-app-start): Make shouldSendStartMeasurements volatile
buenaflor Jun 29, 2026
d8ffbbc
Merge branch 'feat/app-start-extension-android' into feat/app-start-eโ€ฆ
buenaflor Jun 29, 2026
6f6b8e3
Merge branch 'feat/app-start-extension-materialize' into feat/app-staโ€ฆ
buenaflor Jun 29, 2026
04c2835
docs(extend-app-start): Explain why AppStartExtension holds span and โ€ฆ
buenaflor Jul 2, 2026
b8779ca
feat(extend-app-start): Return null from getExtendedAppStartSpan whenโ€ฆ
buenaflor Jul 2, 2026
adedde8
Merge branch 'feat/app-start-extension-core' into feat/app-start-exteโ€ฆ
buenaflor Jul 2, 2026
8420f74
feat(extend-app-start): Return null from AppStartExtension.getExtendeโ€ฆ
buenaflor Jul 2, 2026
fd32a34
Merge branch 'feat/app-start-extension-android' into feat/app-start-eโ€ฆ
buenaflor Jul 2, 2026
5590df0
Merge branch 'feat/app-start-extension-materialize' into feat/app-staโ€ฆ
buenaflor Jul 2, 2026
3d4d55a
test(extend-app-start): Assert null extended span now that getExtendeโ€ฆ
buenaflor Jul 2, 2026
41a8e05
Merge branch 'feat/app-start-extension-materialize' into feat/app-staโ€ฆ
buenaflor Jul 2, 2026
71b7584
feat(extend-app-start): Make Sentry.getExtendedAppStartSpan() nullable
buenaflor Jul 2, 2026
9caa920
Merge remote-tracking branch 'origin/feat/extend-app-start' into featโ€ฆ
buenaflor Jul 6, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,7 @@ public void register(final @NotNull IScopes scopes, final @NotNull SentryOptions
if (performanceEnabled && this.options.isEnableStandaloneAppStartTracing()) {
final @NotNull AppStartMetrics metrics = AppStartMetrics.getInstance();
metrics.setHeadlessAppStartListener(this::onHeadlessAppStart);
// Enables Sentry.extendAppStart(): the eager App Start transaction is created here (we have
// scopes). Only registered for standalone tracing, which makes the extend API
// standalone-only.
// Enables Sentry.extendAppStart(). Standalone-only, since it is only registered here.
metrics.getAppStartExtension().setExtendAppStartListener(this::onExtendAppStartRequested);
addIntegrationToSdkVersion("StandaloneAppStart");
}
Expand Down Expand Up @@ -270,7 +268,7 @@ private void startTracing(final @NotNull Activity activity) {

// An eagerly-created extension transaction (Sentry.extendAppStart) is still open: continue
// its trace into ui.load instead of creating a second app.start, and don't treat its stored
// trace headers as a finished headless start (hardening B).
// trace headers as a finished headless start.
final boolean extensionActive =
AppStartMetrics.getInstance().getAppStartExtension().isActive();

Expand Down Expand Up @@ -329,10 +327,9 @@ private void startTracing(final @NotNull Activity activity) {
}

if (extensionActive) {
// The eager app.start txn was created in onCreate, before any activity existed. Attach
// the
// screen (this first activity) now so it matches the foreground standalone app.start and
// the event processor treats it as a foreground - not headless - start.
// Attach the screen (this first activity) so the eager app.start matches the foreground
// standalone app.start and the event processor treats it as a foreground (not headless)
// start.
AppStartMetrics.getInstance()
.getAppStartExtension()
.setData(APP_START_SCREEN_DATA, activityName);
Expand Down Expand Up @@ -996,11 +993,8 @@ private void finishAppStartSpan(final @Nullable SentryDate endDate) {
if (appStartTransaction != null && !appStartTransaction.isFinished()) {
appStartTransaction.finish(SpanStatus.OK, appStartEndTime);
}
// Finish the eagerly-created extended app start transaction (owned by the extension, so it is
// not in appStartTransaction). waitForChildren holds it open until the extended span
// finishes,
// which is why the vital can never be shorter than this natural first-frame end. No-op when
// the app start was not extended.
// Finish the eager extended transaction at the natural first-frame end. waitForChildren keeps
// it open until the extended span finishes; no-op if the app start was not extended.
AppStartMetrics.getInstance().getAppStartExtension().finishTransaction(appStartEndTime);
}
}
Expand Down Expand Up @@ -1029,9 +1023,8 @@ private void onHeadlessAppStart() {
return;
}

// If the headless app start was extended, the eager app.start txn already exists. Finish it at
// the headless end; waitForChildren keeps it open until the extended span finishes (or the
// deadline forces it). Don't create a second transaction.
// Extended headless start: finish the existing eager txn at the headless end instead of
// creating a second one.
if (metrics.getAppStartExtension().isActive()) {
metrics.getAppStartExtension().finishTransaction(endTime);
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,6 @@ public SentryEvent process(@NotNull SentryEvent event, @NotNull Hint hint) {
}
} else {
appStartUpDurationMs = naturalDurationMs;
// if appStartUpDurationMs is 0, metrics are not ready to be sent
appStartReady = appStartUpDurationMs != 0;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -323,8 +323,6 @@ class ActivityLifecycleIntegrationTest {
assertNull(appStartTransaction.getData("app.vitals.start.reason"))
}

// region extended app start

@Test
fun `extendAppStart eagerly creates a standalone app start transaction with the extended span`() {
val sut =
Expand Down Expand Up @@ -471,13 +469,11 @@ class ActivityLifecycleIntegrationTest {
assertTrue(AppStartMetrics.getInstance().appStartExtension.isActive)

// The eager txn is owned by the extension, not the integration's appStartTransaction field, so
// the per-activity cleanup can't cancel it (hardening A).
// the per-activity cleanup can't cancel it.
sut.onActivityDestroyed(activity)
assertTrue(AppStartMetrics.getInstance().appStartExtension.isActive)
}

// endregion

@Test
@Config(sdk = [Build.VERSION_CODES.VANILLA_ICE_CREAM])
fun `Headless standalone app start transaction carries app start reason when available`() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,6 @@ class PerformanceAndroidEventProcessorTest {
assertEquals(20f, tr.measurements[MeasurementValue.KEY_APP_START_COLD]?.value)
}

// region extended app start

private fun extendAppStartFinishedWith(status: SpanStatus, endMs: Long) {
val span = mock<ISpan>()
whenever(span.isFinished).thenReturn(true)
Expand Down Expand Up @@ -267,8 +265,6 @@ class PerformanceAndroidEventProcessorTest {
assertFalse(tr.measurements.containsKey(MeasurementValue.KEY_APP_START_WARM))
}

// endregion

@Test
fun `add cold start measurement for performance-v2`() {
val sut = fixture.getSut(enablePerformanceV2 = true)
Expand Down
Loading