@@ -99,31 +99,31 @@ export class AwsInstrumentation extends InstrumentationBase<typeof AWS> {
9999 }
100100
101101 protected patchV3ConstructStack ( moduleExports , moduleVersion : string ) {
102- diag . debug ( `applying patch to aws-sdk v3 constructStack` ) ;
102+ diag . debug ( `aws-sdk instrumentation: applying patch to aws-sdk v3 constructStack` ) ;
103103 this . _wrap ( moduleExports , 'constructStack' , this . _getV3ConstructStackPatch . bind ( this , moduleVersion ) ) ;
104104 return moduleExports ;
105105 }
106106
107107 protected unpatchV3ConstructStack ( moduleExports ) {
108- diag . debug ( `applying unpatch to aws-sdk v3 constructStack` ) ;
108+ diag . debug ( `aws-sdk instrumentation: applying unpatch to aws-sdk v3 constructStack` ) ;
109109 this . _unwrap ( moduleExports , 'constructStack' ) ;
110110 return moduleExports ;
111111 }
112112
113113 protected patchV3SmithyClient ( moduleExports ) {
114- diag . debug ( `applying patch to aws-sdk v3 client send` ) ;
114+ diag . debug ( `aws-sdk instrumentation: applying patch to aws-sdk v3 client send` ) ;
115115 this . _wrap ( moduleExports . Client . prototype , 'send' , this . _getV3SmithyClientSendPatch . bind ( this ) ) ;
116116 return moduleExports ;
117117 }
118118
119119 protected unpatchV3SmithyClient ( moduleExports ) {
120- diag . debug ( `applying patch to aws-sdk v3 constructStack` ) ;
120+ diag . debug ( `aws-sdk instrumentation: applying patch to aws-sdk v3 constructStack` ) ;
121121 this . _unwrap ( moduleExports . Client . prototype , 'send' ) ;
122122 return moduleExports ;
123123 }
124124
125125 protected patchV2 ( moduleExports : typeof AWS , moduleVersion : string ) {
126- diag . debug ( `applying patch to ${ AwsInstrumentation . component } ` ) ;
126+ diag . debug ( `aws-sdk instrumentation: applying patch to ${ AwsInstrumentation . component } ` ) ;
127127 this . unpatchV2 ( moduleExports ) ;
128128 this . _wrap ( moduleExports ?. Request . prototype , 'send' , this . _getRequestSendPatch . bind ( this , moduleVersion ) ) ;
129129 this . _wrap ( moduleExports ?. Request . prototype , 'promise' , this . _getRequestPromisePatch . bind ( this , moduleVersion ) ) ;
@@ -405,7 +405,7 @@ export class AwsInstrumentation extends InstrumentationBase<typeof AWS> {
405405 const span = self . _startAwsV2Span ( awsV2Request , requestMetadata , normalizedRequest , moduleVersion ) ;
406406 awsV2Request [ self . REQUEST_SPAN_KEY ] = span ;
407407 const activeContextWithSpan = trace . setSpan ( context . active ( ) , span ) ;
408- const callbackWithContext = context . bind ( callback , activeContextWithSpan ) ;
408+ const callbackWithContext = context . bind ( activeContextWithSpan , callback ) ;
409409
410410 self . _callUserPreRequestHook ( span , normalizedRequest ) ;
411411 self . _registerV2CompletedEvent ( span , awsV2Request , normalizedRequest , activeContextWithSpan ) ;
0 commit comments