@@ -175,8 +175,7 @@ export const instrumentHttp = Object.assign(
175175 patchRequestToCaptureBody ( req , normalizedRequest ) ;
176176
177177 // Update the isolation scope, isolate this request
178- isolationScope . setSDKProcessingMetadata ( { normalizedRequest } ) ;
179- isolationScope . setSDKProcessingMetadata ( { request : req } ) ;
178+ isolationScope . setSDKProcessingMetadata ( { request : req , normalizedRequest } ) ;
180179
181180 const client = getClient < NodeClient > ( ) ;
182181 if ( client && client . getOptions ( ) . autoSessionTracking ) {
@@ -353,7 +352,7 @@ function patchRequestToCaptureBody(req: HTTPModuleRequestIncomingMessage, normal
353352 // eslint-disable-next-line @typescript-eslint/unbound-method
354353 req . on = new Proxy ( req . on , {
355354 apply : ( target , thisArg , args : Parameters < typeof req . on > ) => {
356- const [ event , listener ] = args ;
355+ const [ event , listener , ... restArgs ] = args ;
357356
358357 if ( event === 'data' ) {
359358 const callback = new Proxy ( listener , {
@@ -366,7 +365,7 @@ function patchRequestToCaptureBody(req: HTTPModuleRequestIncomingMessage, normal
366365
367366 callbackMap . set ( listener , callback ) ;
368367
369- return Reflect . apply ( target , thisArg , [ event , callback ] ) ;
368+ return Reflect . apply ( target , thisArg , [ event , callback , ... restArgs ] ) ;
370369 }
371370
372371 if ( event === 'end' ) {
@@ -389,7 +388,7 @@ function patchRequestToCaptureBody(req: HTTPModuleRequestIncomingMessage, normal
389388
390389 callbackMap . set ( listener , callback ) ;
391390
392- return Reflect . apply ( target , thisArg , [ event , callback ] ) ;
391+ return Reflect . apply ( target , thisArg , [ event , callback , ... restArgs ] ) ;
393392 }
394393
395394 return Reflect . apply ( target , thisArg , args ) ;
0 commit comments