Skip to content

Commit

Permalink
fix: patch @smithy/smithy-client@3 for release @aws-sdk/client-* rele…
Browse files Browse the repository at this point in the history
…ases (#4036)

Recently @aws-sdk/client-* releases started using v3 of smithy/smithy-client.
This updates our instr to allow patching v3.
  • Loading branch information
trentm committed May 31, 2024
1 parent 3ae01d2 commit ec2f58e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ See the <<upgrade-to-v4>> guide.
[float]
===== Bug fixes
* Fix instrumentation for recent `@aws-sdk/client-*` releases that use
`@smithy/smithy-client` v3. (For example `@aws-sdk/client-s3@3.575.0` released
2024-05-13 updated to smithy-client v3.) Before this change the APM agent had
been limiting patching of `@smithy/smithy-client` to `>=1 <3`.
* Mark the published AWS Lambda layers as supporting the "nodejs20.x" Lambda
Runtime (`--compatible-runtimes`). The "nodejs20.x" runtime was released by
AWS on 2023-11-15. ({issues}4033[#4033])
Expand Down
4 changes: 2 additions & 2 deletions lib/instrumentation/modules/@smithy/smithy-client.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,10 @@ module.exports = function (mod, agent, { name, version, enabled }) {
if (!enabled) return mod;

// As of `@aws-sdk/*@3.363.0` the underlying smithy-client is under the
// `@smithy/` npm org and is 1.x.
// `@smithy/` npm org.
if (
name === '@smithy/smithy-client' &&
!semver.satisfies(version, '>=1 <3')
!semver.satisfies(version, '>=1 <4')
) {
agent.logger.debug(
'cannot instrument @aws-sdk/client-*: @smithy/smithy-client version %s not supported',
Expand Down

0 comments on commit ec2f58e

Please sign in to comment.