Skip to content

Commit

Permalink
donate this function; comment on why not using the usual _wrap; reduc…
Browse files Browse the repository at this point in the history
…e TAV versions tested
  • Loading branch information
trentm committed Jan 31, 2024
1 parent a3b1ec1 commit 0fcca66
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions plugins/node/opentelemetry-instrumentation-aws-sdk/.tav.yml
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,9 @@ export class AwsInstrumentation extends InstrumentationBase<any> {
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',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)`.
*
Expand Down Expand Up @@ -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];
Expand Down

0 comments on commit 0fcca66

Please sign in to comment.