diff --git a/CHANGELOG.md b/CHANGELOG.md index 5344ba768a..c56caa15a6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,10 @@ ## Unreleased +### Changes + +- Rename `navigation.processing` span to more expressive `Navigation dispatch to screen A mounted/navigation cancelled` ([#4423](https://github.com/getsentry/sentry-react-native/pull/4423)) + ### Dependencies - Bump CLI from v2.39.1 to v2.40.0 ([#4412](https://github.com/getsentry/sentry-react-native/pull/4412)) diff --git a/packages/core/src/js/tracing/reactnavigation.ts b/packages/core/src/js/tracing/reactnavigation.ts index 6fb08890ed..dd33424b9c 100644 --- a/packages/core/src/js/tracing/reactnavigation.ts +++ b/packages/core/src/js/tracing/reactnavigation.ts @@ -203,7 +203,7 @@ export const reactNavigationIntegration = ({ if (enableTimeToInitialDisplay) { navigationProcessingSpan = startInactiveSpan({ op: 'navigation.processing', - name: 'Navigation processing', + name: 'Navigation dispatch to navigation cancelled or screen mounted', startTime: latestNavigationSpan && spanToJSON(latestNavigationSpan).start_timestamp, }); navigationProcessingSpan.setAttribute( @@ -274,7 +274,7 @@ export const reactNavigationIntegration = ({ }); } - navigationProcessingSpan?.updateName(`Processing navigation to ${route.name}`); + navigationProcessingSpan?.updateName(`Navigation dispatch to screen ${route.name} mounted`); navigationProcessingSpan?.setStatus({ code: SPAN_STATUS_OK }); navigationProcessingSpan?.end(stateChangedTimestamp); navigationProcessingSpan = undefined; diff --git a/packages/core/test/tracing/reactnavigation.ttid.test.tsx b/packages/core/test/tracing/reactnavigation.ttid.test.tsx index 7c0637b896..a0245cff12 100644 --- a/packages/core/test/tracing/reactnavigation.ttid.test.tsx +++ b/packages/core/test/tracing/reactnavigation.ttid.test.tsx @@ -204,7 +204,7 @@ describe('React Navigation - TTID', () => { 'sentry.origin': SPAN_ORIGIN_AUTO_NAVIGATION_REACT_NAVIGATION, 'sentry.source': 'custom', }, - description: 'Processing navigation to New Screen', + description: 'Navigation dispatch to screen New Screen mounted', op: 'navigation.processing', origin: SPAN_ORIGIN_AUTO_NAVIGATION_REACT_NAVIGATION, status: 'ok', @@ -232,7 +232,7 @@ describe('React Navigation - TTID', () => { 'sentry.origin': SPAN_ORIGIN_AUTO_NAVIGATION_REACT_NAVIGATION, 'sentry.source': 'custom', }, - description: 'Processing navigation to Initial Screen', + description: 'Navigation dispatch to screen Initial Screen mounted', op: 'navigation.processing', origin: SPAN_ORIGIN_AUTO_NAVIGATION_REACT_NAVIGATION, status: 'ok',