sentry-java
                                
                                 sentry-java copied to clipboard
                                
                                    sentry-java copied to clipboard
                            
                            
                            
                        Errors shortly after SentryAndroid.init do not affect the session
Integration
sentry-android
Build System
Gradle
AGP Version
Proguard
Disabled
Version
6.4.1
Steps to Reproduce
Capture an exception right after SentryAndroid.init
Expected Result
A session is marked as errored and sent to Sentry.
We could start the session earlier. So instead of starting it when the App goes to the foreground (LifecycleWatcher.onStart) we could do it earlier. E.g. synchronously in init.
Actual Result
There is no session thus nothing is reported.
Relates to: https://getsentry.atlassian.net/browse/FEEDBACK-1608
Needs special handling for background starts.
Should not start a new session if one's already running.
Needs special handling for background starts.
@adinauer can you elaborate on this?
@markushi I wrote this down as driver of the sync meeting. Can't remember who brought this up, probably @romtsn or @marandaneto. Maybe they can help out here 🙏
I'm unsure as well but I'd suspect that could be related to if the user wants to manually init the Android SDK in a background thread instead of the auto init or via the Application#onCreate (main thread), if we need to sync something or make it as an atomic operation, just a hunch.