getsentry / getsentry/sentry-react-native

Capture transaction on crash

Ouverte
#4,427 1 commentaire 0 réactions 0 personnes assignées Voir sur GitHub
Improvement React-Native Spans
Langage dominant
TypeScript
Étoiles
1.8k
Forks
367
Merge moyen
1 j 6 h
PR mergées (30 j)
94

Description

### 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:

- **JS Unhandled Error** End and save unfinished JS transaction in global error handler (currently we only handle errors).
- **iOS Crash** End and save unfinished JS transaction when native signal handler is triggered.
- **Android JVM Crash** End and save unfinished JS transaction when JVM DefaultUncaughtExceptionHandler triggered.
- **Android Native Crash** End and save unfinished JS transaction when native signal handler is triggered.

---

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)

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

Commencez par le gestionnaire d'erreurs global de React Native et les gestionnaires de signaux natifs décrits dans l'issue. Lisez react-native-exception-handler, sentry-java's UncaughtExceptionHandlerIntegration.java et sentry-cocoa's SentryCrashIntegration.m pour les chemins d'exception concernés. Le travail est considéré comme terminé lorsque les transactions JS inachevées sont terminées et enregistrées pour les crashes JS, iOS, Android JVM et Android natifs.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
android, ios, javascript, react-native, typescript
Domaine
mobile
Type d'issue
Fonctionnalité
Difficulté
5/5
Temps estimé
Plus d'une semaine
Activité
À l'abandon
Clarté
Plutôt claire
Accessibilité débutants
25/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.