Skip to content
Merged
Changes from all commits
Commits
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 @@ -5,6 +5,7 @@
import android.content.Context;
import android.os.Process;
import android.os.SystemClock;
import android.os.Trace;
import io.sentry.ILogger;
import io.sentry.IScopes;
import io.sentry.ISentryLifecycleToken;
Expand Down Expand Up @@ -95,6 +96,9 @@ public static void init(
@NotNull final Context context,
@NotNull ILogger logger,
@NotNull Sentry.OptionsConfiguration<SentryAndroidOptions> configuration) {
// Started before acquiring the lock so it stays balanced with the endSection() in the finally
// even if acquire() throws.
Trace.beginSection("SentryAndroid.init");
try (final @NotNull ISentryLifecycleToken ignored = staticLock.acquire()) {
Sentry.init(
new SentryAndroidOptionsContainer(),
Expand Down Expand Up @@ -219,6 +223,8 @@ public static void init(
logger.log(SentryLevel.FATAL, "Fatal error during SentryAndroid.init(...)", e);

throw new RuntimeException("Failed to initialize Sentry's SDK", e);
} finally {
Trace.endSection();
}
}

Expand Down
Loading