File tree 2 files changed +22
-9
lines changed
2 files changed +22
-9
lines changed Original file line number Diff line number Diff line change @@ -93,16 +93,19 @@ 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
- status : 'ok' ,
101
- metadata : {
102
- source : 'route' ,
103
- dynamicSamplingContext : traceparentData && ! dynamicSamplingContext ? { } : dynamicSamplingContext ,
96
+ const newTransaction = startTransaction (
97
+ {
98
+ op : 'nextjs.data.server' ,
99
+ name : options . requestedRouteName ,
100
+ ...traceparentData ,
101
+ status : 'ok' ,
102
+ metadata : {
103
+ source : 'route' ,
104
+ dynamicSamplingContext : traceparentData && ! dynamicSamplingContext ? { } : dynamicSamplingContext ,
105
+ } ,
104
106
} ,
105
- } ) ;
107
+ { request : req } ,
108
+ ) ;
106
109
107
110
requestTransaction = newTransaction ;
108
111
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