11import { SPAN_STATUS_ERROR , SPAN_STATUS_OK } from '@sentry/core' ;
22import { type ExpoRouter , wrapExpoRouter } from '../../src/js/tracing' ;
3+ import { SPAN_ORIGIN_AUTO_EXPO_ROUTER_PREFETCH } from '../../src/js/tracing/origin' ;
34
45const mockStartInactiveSpan = jest . fn ( ) ;
56
@@ -51,6 +52,7 @@ describe('wrapExpoRouter', () => {
5152 name : 'Prefetch /details/123' ,
5253 origin : 'auto.navigation.react_navigation' ,
5354 attributes : {
55+ 'sentry.origin' : SPAN_ORIGIN_AUTO_EXPO_ROUTER_PREFETCH ,
5456 'route.href' : '/details/123' ,
5557 'route.name' : '/details/123' ,
5658 } ,
@@ -74,6 +76,7 @@ describe('wrapExpoRouter', () => {
7476 name : 'Prefetch /profile' ,
7577 origin : 'auto.navigation.react_navigation' ,
7678 attributes : {
79+ 'sentry.origin' : SPAN_ORIGIN_AUTO_EXPO_ROUTER_PREFETCH ,
7780 'route.href' : JSON . stringify ( href ) ,
7881 'route.name' : '/profile' ,
7982 } ,
@@ -97,6 +100,7 @@ describe('wrapExpoRouter', () => {
97100 name : 'Prefetch unknown' ,
98101 origin : 'auto.navigation.react_navigation' ,
99102 attributes : {
103+ 'sentry.origin' : SPAN_ORIGIN_AUTO_EXPO_ROUTER_PREFETCH ,
100104 'route.href' : JSON . stringify ( href ) ,
101105 'route.name' : 'unknown' ,
102106 } ,
0 commit comments