Skip to content
Merged
Show file tree
Hide file tree
Changes from 93 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
26 changes: 26 additions & 0 deletions sentry-android-core/api/sentry-android-core.api
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,30 @@ public final class io/sentry/android/core/AppLifecycleIntegration : io/sentry/In
public fun register (Lio/sentry/IScopes;Lio/sentry/SentryOptions;)V
}

public final class io/sentry/android/core/AppStartExtension : io/sentry/IAppStartExtender {
public fun <init> (Lio/sentry/android/core/performance/AppStartMetrics;)V
public fun clear ()V
public fun extendAppStart ()V
public fun finishExtendedAppStart ()V
public fun finishTransaction (Lio/sentry/SentryDate;)V
public fun getExtendedAppStartSpan ()Lio/sentry/ISpan;
public fun getExtendedEndTime ()Lio/sentry/SentryDate;
public fun isActive ()Z
public fun isExtended ()Z
public fun setData (Ljava/lang/String;Ljava/lang/Object;)V
public fun setExtendAppStartListener (Lio/sentry/android/core/AppStartExtension$ExtendAppStartListener;)V
}

public abstract interface class io/sentry/android/core/AppStartExtension$ExtendAppStartListener {
public abstract fun onExtendAppStartRequested ()Lio/sentry/android/core/AppStartExtension$ExtendedAppStart;
}

public final class io/sentry/android/core/AppStartExtension$ExtendedAppStart {
public final field span Lio/sentry/ISpan;
public final field transaction Lio/sentry/ITransaction;
public fun <init> (Lio/sentry/ITransaction;Lio/sentry/ISpan;)V
}

public final class io/sentry/android/core/AppState : java/io/Closeable {
public fun addAppStateListener (Lio/sentry/android/core/AppState$AppStateListener;)V
public fun close ()V
Expand Down Expand Up @@ -739,12 +763,14 @@ public class io/sentry/android/core/performance/AppStartMetrics : io/sentry/andr
public static final field staticLock Lio/sentry/util/AutoClosableReentrantLock;
public fun <init> ()V
public fun addActivityLifecycleTimeSpans (Lio/sentry/android/core/performance/ActivityLifecycleTimeSpan;)V
public fun canExtendAppStart ()Z
public fun clear ()V
public fun createProcessInitSpan ()Lio/sentry/android/core/performance/TimeSpan;
public fun getActivityLifecycleTimeSpans ()Ljava/util/List;
public fun getAppStartBaggageHeader ()Ljava/lang/String;
public fun getAppStartContinuousProfiler ()Lio/sentry/IContinuousProfiler;
public fun getAppStartEndTime ()Lio/sentry/SentryDate;
public fun getAppStartExtension ()Lio/sentry/android/core/AppStartExtension;
public fun getAppStartProfiler ()Lio/sentry/ITransactionProfiler;
public fun getAppStartReason ()Ljava/lang/String;
public fun getAppStartSamplingDecision ()Lio/sentry/TracesSamplingDecision;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ public final class ActivityLifecycleIntegration
static final String APP_START_COLD = "app.start.cold";
static final String TTID_OP = "ui.load.initial_display";
static final String TTFD_OP = "ui.load.full_display";
static final String APP_START_EXTENDED_OP = "app.start.extended";
static final String APP_START_EXTENDED_DESC = "Extended App Start";
static final long TTFD_TIMEOUT_MILLIS = 25000;
// If a headless app start and the following activity's ui.load are more than this far apart, they
// are treated as unrelated and not connected into the same trace.
Expand Down Expand Up @@ -139,7 +141,9 @@ public void register(final @NotNull IScopes scopes, final @NotNull SentryOptions
application.registerActivityLifecycleCallbacks(this);

if (performanceEnabled && this.options.isEnableStandaloneAppStartTracing()) {
AppStartMetrics.getInstance().setHeadlessAppStartListener(this::onHeadlessAppStart);
final @NotNull AppStartMetrics metrics = AppStartMetrics.getInstance();
metrics.setHeadlessAppStartListener(this::onHeadlessAppStart);
metrics.getAppStartExtension().setExtendAppStartListener(this::onExtendAppStartRequested);
addIntegrationToSdkVersion("StandaloneAppStart");
}

Expand All @@ -154,7 +158,9 @@ private boolean isPerformanceEnabled(final @NotNull SentryAndroidOptions options
@Override
public void close() throws IOException {
application.unregisterActivityLifecycleCallbacks(this);
AppStartMetrics.getInstance().setHeadlessAppStartListener(null);
final @NotNull AppStartMetrics metrics = AppStartMetrics.getInstance();
metrics.setHeadlessAppStartListener(null);
metrics.getAppStartExtension().setExtendAppStartListener(null);

if (options != null) {
options.getLogger().log(SentryLevel.DEBUG, "ActivityLifecycleIntegration removed.");
Expand Down Expand Up @@ -259,17 +265,23 @@ private void startTracing(final @NotNull Activity activity) {
transactionOptions.setAppStartTransaction(appStartSamplingDecision != null);
setSpanOrigin(transactionOptions);

// Guards the headless-start check below with !isExtensionActive so the eager extension's
// stored trace id isn't mistaken for a finished headless start.
final boolean isExtensionActive =
AppStartMetrics.getInstance().getAppStartExtension().isActive();

final @Nullable SentryId storedAppStartTraceId =
AppStartMetrics.getInstance().getAppStartTraceId();
final boolean isFollowingHeadlessAppStart = (storedAppStartTraceId != null);
final boolean isFollowingHeadlessAppStart =
!isExtensionActive && (storedAppStartTraceId != null);

final boolean isAppStart =
!(firstActivityCreated || appStartTime == null || coldStart == null);
// Foreground starts create app.start first; ui.load then shares its trace.
final boolean createStandaloneAppStart =
isAppStart
&& options.isEnableStandaloneAppStartTracing()
&& !isFollowingHeadlessAppStart;
&& !isFollowingHeadlessAppStart
&& !isExtensionActive;

if (createStandaloneAppStart) {
final TransactionOptions appStartTransactionOptions = new TransactionOptions();
Expand Down Expand Up @@ -300,15 +312,23 @@ private void startTracing(final @NotNull Activity activity) {
continueSentryTrace = appStartTransaction.toSentryTrace().getValue();
final @Nullable BaggageHeader baggageHeader = appStartTransaction.toBaggageHeader(null);
continueBaggage = baggageHeader == null ? null : baggageHeader.getValue();
} else if (isFollowingHeadlessAppStart
&& isWithinAppStartContinuationWindow(ttidStartTime)) {
} else if (isExtensionActive
|| (isFollowingHeadlessAppStart && isWithinAppStartContinuationWindow(ttidStartTime))) {
continueSentryTrace = AppStartMetrics.getInstance().getAppStartSentryTraceHeader();
continueBaggage = AppStartMetrics.getInstance().getAppStartBaggageHeader();
} else {
continueSentryTrace = null;
continueBaggage = null;
}

if (isExtensionActive && isAppStart) {
// Only the launch activity sets the screen, so a later activity can't overwrite it. A
// screen also keeps the processor from classifying the eager app.start as headless.
AppStartMetrics.getInstance()
.getAppStartExtension()
.setData(APP_START_SCREEN_DATA, activityName);
}

final @Nullable TransactionContext continuedContext =
continueSentryTrace == null
? null
Expand All @@ -328,8 +348,8 @@ && isWithinAppStartContinuationWindow(ttidStartTime)) {
transactionOptions);
}

if (isFollowingHeadlessAppStart) {
// Consume the stored headless app-start trace so it isn't reused by another activity.
if (isFollowingHeadlessAppStart || isExtensionActive) {
// Consume the stored app-start trace so a later activity doesn't reuse it.
AppStartMetrics.getInstance().setAppStartTraceId(null);
AppStartMetrics.getInstance().setAppStartSentryTraceHeader(null);
AppStartMetrics.getInstance().setAppStartBaggageHeader(null);
Expand Down Expand Up @@ -967,6 +987,9 @@ private void finishAppStartSpan(final @Nullable SentryDate endDate) {
if (appStartTransaction != null && !appStartTransaction.isFinished()) {
appStartTransaction.finish(SpanStatus.OK, appStartEndTime);
}
// 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 @@ -994,17 +1017,53 @@ private void onHeadlessAppStart() {
return;
}

// Persist the end time so a later ui.load can tell whether it is close enough to continue this
// trace; without it the continuation window is unbounded.
metrics.setAppStartEndTime(endTime);

final @NotNull AppStartExtension extension = metrics.getAppStartExtension();
if (extension.isActive()) {
extension.finishTransaction(endTime);
return;
}
if (!metrics.shouldSendStartMeasurements(true)) {
return;
}

final @NotNull ITransaction transaction =
createStandaloneAppStartTransaction(startTime, null, false);
transaction.finish(SpanStatus.OK, endTime);
}

/**
* Creates the standalone {@code app.start} transaction (not bound to the scope) and persists its
* trace headers so a later {@code ui.load} can share the same trace. Shared by the headless path
* and the eager extension path. When {@code holdOpenForExtension} is true, the transaction waits
* for its children and gets a deadline so it stays open until the extended span finishes.
*/
private @NotNull ITransaction createStandaloneAppStartTransaction(
final @NotNull SentryDate startTime,
final @Nullable TracesSamplingDecision samplingDecision,
final boolean holdOpenForExtension) {
final @NotNull AppStartMetrics metrics = AppStartMetrics.getInstance();

final TransactionOptions txnOptions = new TransactionOptions();
txnOptions.setBindToScope(false);
txnOptions.setStartTimestamp(startTime);
txnOptions.setOrigin(APP_START_TRACE_ORIGIN);
txnOptions.setAppStartTransaction(samplingDecision != null);
if (holdOpenForExtension) {
txnOptions.setWaitForChildren(true);
final long deadlineTimeoutMillis = options.getDeadlineTimeout();
txnOptions.setDeadlineTimeout(deadlineTimeoutMillis <= 0 ? null : deadlineTimeoutMillis);
}

final @NotNull TransactionContext txnContext =
new TransactionContext(
STANDALONE_APP_START_NAME,
TransactionNameSource.COMPONENT,
STANDALONE_APP_START_OP,
null);
samplingDecision);

final @NotNull ITransaction transaction = scopes.startTransaction(txnContext, txnOptions);
final @Nullable String appStartReason = metrics.getAppStartReason();
Expand All @@ -1016,10 +1075,51 @@ private void onHeadlessAppStart() {
metrics.setAppStartSentryTraceHeader(transaction.toSentryTrace().getValue());
final @Nullable BaggageHeader baggageHeader = transaction.toBaggageHeader(null);
metrics.setAppStartBaggageHeader(baggageHeader == null ? null : baggageHeader.getValue());
// Persist the end time so a later activity can decide whether its ui.load is close enough in
// time to continue this trace.
metrics.setAppStartEndTime(endTime);
return transaction;
}

transaction.finish(SpanStatus.OK, endTime);
/**
* Handles {@code Sentry.extendAppStart()}: eagerly creates the standalone app.start transaction
* and the extended child span (we have scopes here), then hands both to the {@link
* AppStartExtension}, which owns them. The transaction is held open ({@code waitForChildren})
* until the user calls {@code Sentry.finishExtendedAppStart()} or the deadline forces it.
* Standalone-only: this is only registered as a listener when standalone app start tracing is
* enabled.
*/
private @Nullable AppStartExtension.ExtendedAppStart onExtendAppStartRequested() {
if (scopes == null
|| options == null
|| !performanceEnabled
|| !options.isEnableStandaloneAppStartTracing()) {
return null;
}
final @NotNull AppStartMetrics metrics = AppStartMetrics.getInstance();

final @NotNull TimeSpan appStartTimeSpan =
metrics.getAppStartTimeSpan().hasStarted()
? metrics.getAppStartTimeSpan()
: metrics.getSdkInitTimeSpan();
final @Nullable SentryDate startTime = appStartTimeSpan.getStartTimestamp();
if (startTime == null) {
return null;
}

final @Nullable TracesSamplingDecision samplingDecision = metrics.getAppStartSamplingDecision();
metrics.setAppStartSamplingDecision(null);

final @NotNull ITransaction transaction =
createStandaloneAppStartTransaction(startTime, samplingDecision, true);

final SpanOptions spanOptions = new SpanOptions();
setSpanOrigin(spanOptions);
final @NotNull ISpan extendedSpan =
transaction.startChild(
APP_START_EXTENDED_OP,
APP_START_EXTENDED_DESC,
AndroidDateUtils.getCurrentSentryDateTime(),
Instrumenter.SENTRY,
spanOptions);

return new AppStartExtension.ExtendedAppStart(transaction, extendedSpan);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ static void initializeIntegrationsAndProcessors(
}

final @NotNull AppStartMetrics appStartMetrics = AppStartMetrics.getInstance();
options.setAppStartExtender(appStartMetrics.getAppStartExtension());

if (options.getModulesLoader() instanceof NoOpModulesLoader) {
options.setModulesLoader(new AssetsModulesLoader(context, options));
Expand Down
Loading
Loading