Skip to content

Commit 55e1f87

Browse files
committed
moved AppStartMetrics instance back before init stuff
1 parent 6991f6f commit 55e1f87

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

sentry-android-core/src/main/java/io/sentry/android/core/AndroidOptionsInitializer.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,8 @@ static void initializeIntegrationsAndProcessors(
182182
options.setTransportGate(new AndroidTransportGate(options));
183183
}
184184

185+
final @NotNull AppStartMetrics appStartMetrics = AppStartMetrics.getInstance();
186+
185187
if (options.getModulesLoader() instanceof NoOpModulesLoader) {
186188
options.setModulesLoader(new AssetsModulesLoader(context, options.getLogger()));
187189
}
@@ -248,7 +250,6 @@ static void initializeIntegrationsAndProcessors(
248250
// Check if the profiler was already instantiated in the app start.
249251
// We use the Android profiler, that uses a global start/stop api, so we need to preserve the
250252
// state of the profiler, and it's only possible retaining the instance.
251-
final @NotNull AppStartMetrics appStartMetrics = AppStartMetrics.getInstance();
252253
final @Nullable ITransactionProfiler appStartTransactionProfiler;
253254
final @Nullable IContinuousProfiler appStartContinuousProfiler;
254255
try (final @NotNull ISentryLifecycleToken ignored = AppStartMetrics.staticLock.acquire()) {

0 commit comments

Comments
 (0)