getsentry / sentry-react-native

Official Sentry SDK for React Native
https://sentry.io
MIT License
1.64k stars 342 forks source link

Capture transaction on crash #4427

Open krystofwoldrich opened 1 month ago

krystofwoldrich commented 1 month ago

Description

The React Native SDK does not capture unfinished transactions on application crash. Because performance is handled in JS we need to ensure transactions are saved in the following cases:


Context for calling JS from native during exception handling. https://github.com/a7ul/react-native-exception-handler

sentry-java implementation https://github.com/getsentry/sentry-java/blob/94071dac205bde6a3126cae0a3e35b559e5e915d/sentry/src/main/java/io/sentry/UncaughtExceptionHandlerIntegration.java#L109-L113

sentry-cocoa implementation (not by default) https://github.com/getsentry/sentry-cocoa/blob/0d38adaabb4ae206e7237ec24647751558142548/Sources/Sentry/SentryCrashIntegration.m#L41-L49 (flag https://github.com/getsentry/sentry-cocoa/blob/0d38adaabb4ae206e7237ec24647751558142548/Sources/Sentry/SentryCrashIntegration.m#L127-L129)

krystofwoldrich commented 1 month ago

Priority for JS Unhandled Error