AddBreadCrumbs to Native Exception #2762
Replies: 3 comments 1 reply
-
As you said the Breadcrumbs added by But I don't know if that would work for you or if you need to include the information at the moment of the native exception. Then you would need to initialize the native SDKs manually as described in the docs. |
Beta Was this translation helpful? Give feedback.
-
I wasn't sure if beforeSend get's called. Good to know I shouldn't expect that thanks! I tried a different route which works sometimes. I add breadcrumbs using react-native-exception-handler. these breadcrumbs show up at random spots in the breadcrumb list as the timestamp is often one of the earliest. const nativeExceptionHandler = (exceptionString) => {
addAppExtrasCrumbs();
Sentry.captureException(new Error(exceptionString));
};
setNativeExceptionHandler(nativeExceptionHandler, false /* forceQuitApp */, true /* execute default handler */); |
Beta Was this translation helpful? Give feedback.
-
We use beforeSend to add new breadcrumbs and information before sending an event.
This code doesn't seem to run when a native exception fires.
I've tried using https://github.com/a7ul/react-native-exception-handler to adjust the event as well but that doesn't end up changing the sentry event.
What is the recommended way to add data to a native exception?
Thanks
Beta Was this translation helpful? Give feedback.
All reactions