File tree Expand file tree Collapse file tree 2 files changed +21
-8
lines changed Expand file tree Collapse file tree 2 files changed +21
-8
lines changed Original file line number Diff line number Diff line change @@ -93,15 +93,18 @@ export function callTracedServerSideDataFetcher<F extends (...args: any[]) => Pr
93
93
94
94
const dynamicSamplingContext = baggageHeaderToDynamicSamplingContext ( rawBaggageString ) ;
95
95
96
- const newTransaction = startTransaction ( {
97
- op : 'nextjs.data.server' ,
98
- name : options . requestedRouteName ,
99
- ...traceparentData ,
100
- metadata : {
101
- source : 'route' ,
102
- dynamicSamplingContext : traceparentData && ! dynamicSamplingContext ? { } : dynamicSamplingContext ,
96
+ const newTransaction = startTransaction (
97
+ {
98
+ op : 'nextjs.data.server' ,
99
+ name : options . requestedRouteName ,
100
+ ...traceparentData ,
101
+ metadata : {
102
+ source : 'route' ,
103
+ dynamicSamplingContext : traceparentData && ! dynamicSamplingContext ? { } : dynamicSamplingContext ,
104
+ } ,
103
105
} ,
104
- } ) ;
106
+ { request : req } ,
107
+ ) ;
105
108
106
109
requestTransaction = newTransaction ;
107
110
autoEndTransactionOnResponseEnd ( newTransaction , res ) ;
Original file line number Diff line number Diff line change @@ -45,6 +45,11 @@ describe('data-fetching function wrappers', () => {
45
45
op : 'nextjs.data.server' ,
46
46
metadata : expect . objectContaining ( { source : 'route' } ) ,
47
47
} ) ,
48
+ {
49
+ request : expect . objectContaining ( {
50
+ url : 'http://dogs.are.great/tricks/kangaroo' ,
51
+ } ) ,
52
+ } ,
48
53
) ;
49
54
50
55
expect ( setMetadataSpy ) . toHaveBeenCalledWith ( { request : req } ) ;
@@ -62,6 +67,11 @@ describe('data-fetching function wrappers', () => {
62
67
op : 'nextjs.data.server' ,
63
68
metadata : expect . objectContaining ( { source : 'route' } ) ,
64
69
} ) ,
70
+ {
71
+ request : expect . objectContaining ( {
72
+ url : 'http://dogs.are.great/tricks/kangaroo' ,
73
+ } ) ,
74
+ } ,
65
75
) ;
66
76
67
77
expect ( setMetadataSpy ) . toHaveBeenCalledWith ( { request : req } ) ;
You can’t perform that action at this time.
0 commit comments