diff --git a/plugins/node/opentelemetry-instrumentation-aws-sdk/.tav.yml b/plugins/node/opentelemetry-instrumentation-aws-sdk/.tav.yml index b678e4b15c..0ad091fb0d 100644 --- a/plugins/node/opentelemetry-instrumentation-aws-sdk/.tav.yml +++ b/plugins/node/opentelemetry-instrumentation-aws-sdk/.tav.yml @@ -1,18 +1,18 @@ "aws-sdk": # A small subset of releases in the range [2.308.0, 3) to reduce testing time. - versions: "2.308.0 || 2.548.0 || 2.785.0 || 2.1025.0 || 2.1265.0 || 2.1506.0 || >=2.1508.0" + versions: "2.308.0 || 2.556.0 || 2.801.0 || 2.1049.0 || 2.1297.0 || 2.1546.0 || >=2.1548.0" commands: - npm run test "@aws-sdk/client-s3": # A small subset of releases in the range [3.6.1, 4) to reduce testing time. # - 3.377.0 was a bad release (see issue #1828). - versions: "3.6.1 || 3.53.0 || 3.163.0 || 3.266.0 || 3.354.0 || 3.458.0 || >=3.462.0" + versions: "3.6.1 || 3.55.0 || 3.180.0 || 3.289.0 || 3.385.0 || 3.498.0 || >=3.503.1" commands: - npm run test "@aws-sdk/client-sqs": # A small subset of releases in the range [3.24.0, 4) to reduce testing time. - versions: "3.24.0 || 3.85.0 || 3.194.0 || 3.278.0 || 3.357.0 || 3.461.0 || >=3.462.0" + versions: "3.24.0 || 3.94.0 || 3.202.0 || 3.296.0 || 3.388.0 || 3.496.0 || >=3.503.1" commands: - npm run test diff --git a/plugins/node/opentelemetry-instrumentation-aws-sdk/src/aws-sdk.ts b/plugins/node/opentelemetry-instrumentation-aws-sdk/src/aws-sdk.ts index 06a1b7ba92..349d2ff388 100644 --- a/plugins/node/opentelemetry-instrumentation-aws-sdk/src/aws-sdk.ts +++ b/plugins/node/opentelemetry-instrumentation-aws-sdk/src/aws-sdk.ts @@ -113,7 +113,9 @@ export class AwsInstrumentation extends InstrumentationBase { v3MiddlewareStackFileNewVersions, ]); - // patch for @smithy/middleware-stack for aws-sdk packages v3.363.0+ + // Patch for @smithy/middleware-stack for @aws-sdk/* packages v3.363.0+. + // As of @smithy/middleware-stack@2.1.0 `constructStack` is only available + // as a getter, so we cannot use `this._wrap()`. const self = this; const v3SmithyMiddlewareStack = new InstrumentationNodeModuleDefinition( '@smithy/middleware-stack', diff --git a/plugins/node/opentelemetry-instrumentation-aws-sdk/src/propwrap.ts b/plugins/node/opentelemetry-instrumentation-aws-sdk/src/propwrap.ts index 62c4e21439..ca59d52c54 100644 --- a/plugins/node/opentelemetry-instrumentation-aws-sdk/src/propwrap.ts +++ b/plugins/node/opentelemetry-instrumentation-aws-sdk/src/propwrap.ts @@ -65,8 +65,6 @@ const __copyProps = ( }; /** - * Derived from https://github.com/elastic/apm-agent-nodejs/blob/main/lib/propwrap.js - * * Return a new object that is a copy of `obj`, with its `subpath` property * replaced with the return value of `wrapper(original)`. * @@ -110,7 +108,7 @@ export const propwrap = (obj: any, subpath: string, wrapper: Function): any => { let val; // 1. Traverse the subpath parts to sanity check and get references to the - // Objects that will will be copying. + // Objects that we will be copying. for (let i = 0; i < parts.length; i++) { key = parts[i]; val = namespace[key];