getsentry / getsentry/sentry-react-native

Add Sentry.crashedLastRunEventId()

Abierto
#2,789 4 comentarios 0 reacciones 0 asignados Ver en GitHub
Blocked Feature React-Native User Feedbacks
Lenguaje dominante
TypeScript
Estrellas
1.8k
Forks
366
Merge medio
1 d 6 h
PR fusionados (30 d)
94

Descripción

**OS:**

- [ ] Windows
- [X] MacOS
- [ ] Linux

**Platform:**

- [X] iOS
- [ ] Android

**SDK:**

- [X] `@sentry/react-native` (>= 1.0.0)
- [ ] `react-native-sentry` (<= 0.43.2)

**SDK version:** 4.12.0

`react-native` version: 0.69.3

**Are you using Expo?**

- [ ] Yes
- [X] No

**Are you using **[**sentry.io**]()** or on-premise?**

- [X] [sentry.io]() (SaaS)
- [ ] on-premise

**If you are using **[**sentry.io**]()**, please post a link to your issue so we can take a look:**

N/A

**Configuration:**

(`import * as Sentry from "@sentry/react-native";`)

```
Sentry.init({
sampleRate: sampleRate?.errorSampleRate
? sampleRate?.errorSampleRate
: 0.5, //We fetch the sample rate on app launch/initialization we have a 50% sample rate as a fallback in the event we fail to fetch or device is offline
enableNativeCrashHandling: true,
// allows redux object to serialise deeply
normalizeDepth: 5,
dsn: 'https://...@sentry.io/...'
environment: jsEnv.SENTRY_ENVIRONMENT,
integrations: [
rewriteFramesIntegration,
new ExtraErrorData({ depth: 4 }),
new Sentry.ReactNativeTracing({
routingInstrumentation
})
],
...sentryOptions
});
```

---

**I have following issue:**

Tried calling `Sentry.lastEventId()` on the main screen of our app after a crash had happened and it returned `undefined`.
Looks like event Id is not persisted?

**Steps to reproduce:**

* Call `nativeCrash()` from "@sentry/react-native"
* On app relaunch call `Sentry.lastEventId()` and inspect value returned.

**Actual result:**

`undefined`

**Expected result:**

Some sort of Id

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

Comienza con la API Sentry.lastEventId() y la ruta de reproducción de nativeCrash() en @sentry/react-native; el payload no especifica ningún archivo fuente ni prueba. Reproduce el fallo, vuelve a iniciar la app de iOS e inspecciona cómo se gestiona el ID del evento a través de ese límite. Está terminado cuando el ID del evento del fallo está disponible mediante Sentry.crashedLastRunEventId() después de volver a iniciar la app.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
ios, react-native, typescript
Área
mobile, observability-sre
Tipo de issue
Nueva funcionalidad
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
42/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.