Register navigation, route and deep-link attributes in Sentry Conventions

Abierto
#7,052 1 comentario 0 reacciones 0 asignados Ver en GitHub

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
55/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
react-native, typescript

Línea de trabajo

Start with the Sentry Conventions PR and the dependency issue for @sentry/conventions; the issue says that PR needs code-owner approval and a three-business-day wait. Then inspect src/js/tracing/semanticAttributes.ts and the listed instrumentation files for the attribute literals. Done when the conventions are merged with backfill aliases for renamed keys and the SDK uses the registered constants.

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

Descripción

React-Native Task

The React Navigation, Expo Router and React Native Navigation instrumentations send attributes that aren't in Sentry Conventions. Register them (or map them to existing keys), then switch the SDK to the constants.

Keys

  • route.name, route.key, route.component_id, route.component_type, route.has_been_seen, route.path, route.url, route.href, route.initial_display_fallback
  • previous_route.name, previous_route.key, previous_route.component_id, previous_route.component_type
  • routing.instrumentation
  • navigation.method, navigation.trigger, navigation.action_type
  • deeplink.url, deeplink.dispatch_delay_ms

Open questions for the Sentry Conventions PR

  • Namespace: top-level route is deprecated in favour of http.route, and previous_route is a single leaf attribute. The proposal is navigation.route.* (navigation.route.id already exists) and navigation.previous_route.*, with the SDK renaming to them under backfill aliases.
  • Units: Sentry Conventions keeps units out of key names, so deeplink.dispatch_delay_ms likely becomes deeplink.dispatch_delay with the unit in its definition.
  • Scrubbing: set apply_scrubbing on route.url, route.href and deeplink.url. The SDK already gates them on sendDefaultPii or sanitizes them.
  • Don't use navigation.type: it's deprecated in favour of router.navigation.type.

Acceptance criteria

  • The Sentry Conventions PR is merged (it needs one code-owner approval, then a 3-business-day wait).
  • The SDK uses the registered keys through @sentry/conventions constants.
  • Any renamed keys are covered by backfill aliases in Sentry Conventions.
Agent notes
  • Local constants: src/js/tracing/semanticAttributes.ts.
  • Literal keys in:
    • src/js/tracing/reactnavigation.ts: route.path/route.url at lines 825–826, deep-link attributes at lines 958–963.
    • src/js/tracing/expoRouter.ts: route.href, navigation.method.
    • src/js/tracing/expoRouterErrorBoundary.tsx: route.path.
    • src/js/tracing/reactnativenavigation.ts.
    • src/js/tracing/onSpanEndUtils.ts.
  • Depends on the @sentry/conventions dependency issue in this project for the constant swap.
Lenguaje dominante
TypeScript
Estrellas
1.8k
Forks
371
Merge medio
22 h 3 min
PR fusionados (30 d)
106

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de getsentry/sentry-react-native

Todos los issues de getsentry/sentry-react-native

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.