Skip to content

Commit a408fc4

Browse files
committed
chore(aws): replace deprecated substr with subtring
1 parent d5215f3 commit a408fc4

File tree

2 files changed

+2
-2
lines changed
  • plugins/node

2 files changed

+2
-2
lines changed

plugins/node/opentelemetry-instrumentation-aws-lambda/src/instrumentation.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ 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(0, handlerDef.length - handler.length);
9494

9595
const [module, functionName] = handler.split('.', 2);
9696

plugins/node/opentelemetry-instrumentation-aws-sdk/src/services/sns.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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
}

0 commit comments

Comments
 (0)