sentry-cocoa
sentry-cocoa copied to clipboard
Errors shortly after SentrySDK.init don't affect the session
Description
Capturing an error direclty after calling SentrySDK.init doesn't affect the session error count, as we start the session when didBecomeActive is called.
https://github.com/getsentry/sentry-cocoa/blob/f273eda1e1d73faa43e66fa4330e336347ab46ec/Sources/Sentry/SentrySessionTracker.m#L131-L163
We could start the session during the SDK init / when initializing the SessionIntegration.
Related to https://github.com/getsentry/sentry-java/issues/2241.