Skip to content

Long initialization times #4694

@jhowens89

Description

@jhowens89

Integration

sentry-android

Build System

Gradle

AGP Version

8.11.0

Proguard

Enabled

Version

8.16.0

Steps to Reproduce

SentryAndroid.init(application) { options: SentryAndroidOptions ->
options.dsn = "..."
options.environment = "production"
options.tracesSampleRate = 0.1
options.release = "..."
}

Expected Result

Initializes the vast majority of time <10ms

Actual Result

We have been trying to identify slow operations having during our app's initialization and it has come to our attention that our p90 for Sentry initialization is ~100ms.

What can be done to reduce this latency? We do this very early in app startup to catch any early crashes. This is happening on the main thread (not clear whether doing this on a background thread is necessarily supported (ex)).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    Status

    Waiting for: Community

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions