Open krystofwoldrich opened 7 months ago
@krystofwoldrich customer is asking:
do you have any timeline/estimate around when this issue could be fixed?
@realkosty We don't have a timeline yet. But it's possible to capture the startup crashes when initializing the native SDKs manually. The How to set up for start up crashes at the moment
part of the issue.
Description
Currently, start-up crashes that happen before the RN JS SDK starts are not recorded by default. This is due to the native SDKs being initialized by the RN JS SDK. Which starts when the JS Engine starts executing the JS bundle.
How to set up for start up crashes at the moment
Add SentryAndroid.init to
MainApplication
:Add SentrySDK to
AppDelegate
:With this approach our users have to manually mirror all the options from https://github.com/getsentry/sentry-react-native/blob/5329a1e953a679b75b8b0626e6947ff8216bdcac/ios/RNSentry.mm#L68 and https://github.com/getsentry/sentry-react-native/blob/5329a1e953a679b75b8b0626e6947ff8216bdcac/android/src/main/java/io/sentry/react/RNSentryModuleImpl.java#L158 and their JS init to get the same experience as with
autoNativeInitialization
from JS.How to set up for start up crashes in the future
The native SDKs are initialized by the JS layer for ease of use and the single source of configuration (the JS
Sentry.init(options)
).The native SDKs require at minimum a DSN to send the start up crash event. Since we want to automatically init the native SDKs before the JS SDK, the DSN will have to be set at multiple places:
This complexity should be hidden from the users.
@sentry/react-native/expo
plugin options.