File tree Expand file tree Collapse file tree 2 files changed +22
-9
lines changed Expand file tree Collapse file tree 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
9393
9494 const dynamicSamplingContext = baggageHeaderToDynamicSamplingContext ( rawBaggageString ) ;
9595
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+ } ,
104106 } ,
105- } ) ;
107+ { request : req } ,
108+ ) ;
106109
107110 requestTransaction = newTransaction ;
108111 autoEndTransactionOnResponseEnd ( newTransaction , res ) ;
Original file line number Diff line number Diff line change @@ -45,6 +45,11 @@ describe('data-fetching function wrappers', () => {
4545 op : 'nextjs.data.server' ,
4646 metadata : expect . objectContaining ( { source : 'route' } ) ,
4747 } ) ,
48+ {
49+ request : expect . objectContaining ( {
50+ url : 'http://dogs.are.great/tricks/kangaroo' ,
51+ } ) ,
52+ } ,
4853 ) ;
4954
5055 expect ( setMetadataSpy ) . toHaveBeenCalledWith ( { request : req } ) ;
@@ -62,6 +67,11 @@ describe('data-fetching function wrappers', () => {
6267 op : 'nextjs.data.server' ,
6368 metadata : expect . objectContaining ( { source : 'route' } ) ,
6469 } ) ,
70+ {
71+ request : expect . objectContaining ( {
72+ url : 'http://dogs.are.great/tricks/kangaroo' ,
73+ } ) ,
74+ } ,
6575 ) ;
6676
6777 expect ( setMetadataSpy ) . toHaveBeenCalledWith ( { request : req } ) ;
You can’t perform that action at this time.
0 commit comments