File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
opentelemetry-instrumentation-aws-lambda/src
opentelemetry-instrumentation-aws-sdk/src/services Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -90,7 +90,10 @@ export class AwsLambdaInstrumentation extends InstrumentationBase<AwsLambdaInstr
9090 }
9191
9292 const handler = path . basename ( handlerDef ) ;
93- const moduleRoot = handlerDef . substr ( 0 , handlerDef . length - handler . length ) ;
93+ const moduleRoot = handlerDef . substring (
94+ 0 ,
95+ handlerDef . length - handler . length
96+ ) ;
9497
9598 const [ module , functionName ] = handler . split ( '.' , 2 ) ;
9699
Original file line number Diff line number Diff line change @@ -93,7 +93,7 @@ export class SnsServiceExtension implements ServiceExtension {
9393 if ( topicArn || targetArn ) {
9494 const arn = topicArn ?? targetArn ;
9595 try {
96- return arn . substr ( arn . lastIndexOf ( ':' ) + 1 ) ;
96+ return arn . substring ( arn . lastIndexOf ( ':' ) + 1 ) ;
9797 } catch ( err ) {
9898 return arn ;
9999 }
You can’t perform that action at this time.
0 commit comments