Support RN SDK use in libraries
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 25/100
- Tipo de issue
- Error
- Claridad
- Necesita aclaración
- Estado de actividad
- Estancado
- Stack tecnológico
- javascript, react-native
- Área
- mobile, observability
Línea de trabajo
Comienza reproduciendo el problema con React Native 0.71.11, Hermes, Metro y Sentry React Native SDK 6.2.0 en Android e iOS, utilizando el callback beforeSend de Sentry.init y el stacktrace de ejemplo. Traza cómo se generan los nombres de archivo de stacktrace.frames y define como resultado una distinción fiable entre biblioteca y cliente, o una limitación y alternativa documentadas.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
What React Native libraries do you use?
React Native without Frameworks
Are you using sentry.io or on-premise?
sentry.io (SaS)
@sentry/react-native SDK Version
6.2.0
How does your development environment look like?
Sentry React Native SDK Version: 6.2.0
React Native Version: 0.71.11
Hermes Enabled: Yes
Platforms Tested: Android, iOS
Build Tools: Metro bundler
Sentry.init()
Sentry.init({
dsn: 'https://[email protected]/library-project-id',
release: '0.0.1',
beforeSend(event) {
// Attempting to filter errors based on stacktrace
const isFromLibrary = event.exception?.values?.some((value) =>
value.stacktrace?.frames?.some((frame) =>
frame.filename?.includes('/node_modules/@my-library-name')
)
);
return isFromLibrary ? event : null;
},
});
Steps to Reproduce
I am unable to effectively filter errors in my React Native project using stacktrace.frames in the beforeSend callback. Despite providing proper logic to inspect the stack trace and filenames, the error events do not include sufficient information to reliably distinguish between errors originating from my project( my project is react native library ) and those from the client app.
This has become a critical issue for my project, where I am building a React Native SDK that will be integrated into client apps. I want to ensure that only errors from my SDK are sent to my Sentry project, while unexpected errors from client apps (using their own DSN and release) are excluded.
Expected Result
- I expect the stacktrace.frames[].filename to include the library name or a clear identifier (e.g., node_modules/@my-library or similar) that shows where the error originates. This would make it much easier to filter errors specific to the project.
- If this is not posible, is there another reliable way to distinguish between errors originating from the library and client app without relying solely on the stacktrace? Thanks
Actual Result
Stacktrace Does Not Contain library Identifiers:
The stacktrace.frames[].filename does not include a clear path to node_modules/@my/library-name or any other library-specific identifier.
Example stacktrace from a client app error:
"stacktrace": {
"frames": [
{
"filename": "app:///Pressability.js",
"function": "responderEventHandlers.onResponderRelease",
"lineno": 525,
"colno": 27
},
{
"filename": "app:///index.js",
"function": "TouchableOpacity.props.onPress",
"lineno": 171,
"colno": 27
}
]
}
- Lenguaje dominante
- TypeScript
- Estrellas
- 1.8k
- Forks
- 369
- Merge medio
- 21 h 3 min
- PR fusionados (30 d)
- 98
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de getsentry/sentry-react-native
-
sendDefaultPii is reported as deprecated on ReactNativeOptions although dataCollection is hiddenAbiertoBug React-Native Waiting for: Product Owner
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
getsentry/sentry-react-native#6830 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Android: turbo_module.* crash tags permanently pinned to RNSentry.initNativeReactNavigationNewFrameTracking (promise never settles)Posiblemente ocupada @antonis la tomó hace 2 días. AbiertoBug React-Native
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
getsentry/sentry-react-native#6821 · 2 comentarios · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
React-Native Replays Task
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
getsentry/sentry-react-native#6680 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Improvement React-Native
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
getsentry/sentry-react-native#6143 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
React-Native Task User Feedbacks
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
getsentry/sentry-react-native#5932 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
Todos los issues de getsentry/sentry-react-native
Issues similares
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Effect-TS/effect#8728 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Add: CanalPlusSport8SK.skAbiertocheck:passed streams:add
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 90/100
linagora/twake-drive-mobile#436 ·
Los mantenedores suelen responder en 1 día
-
[Bug] The shared instance selector's placeholder and no-match text ignore the display languagePosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 90/100
apache/rocketmq-dashboard#5561 ·
Los mantenedores suelen responder en 3 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 87/100
heygen-com/hyperframes#5002 ·
Los mantenedores suelen responder en 1 día