Skip to content

Commit

Permalink
fix(react-navigation): Make navigation.processing span title more e…
Browse files Browse the repository at this point in the history
…xplicit (#4423)
  • Loading branch information
krystofwoldrich authored Jan 8, 2025
1 parent 94572f6 commit f2d10b7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/js/tracing/reactnavigation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions packages/core/test/tracing/reactnavigation.ttid.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -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',
Expand Down

0 comments on commit f2d10b7

Please # to comment.