Skip to content

Commit

Permalink
fix: instrumentation of @aws-sdk/client-* v3.723.0 and later now wo…
Browse files Browse the repository at this point in the history
…rks (#4398)

v3.723.0 and later of some aws-sdk-js v3 clients updated to use `@smithy/smithy-client@4`
which is part of what is instrumented.
  • Loading branch information
trentm authored Jan 7, 2025
1 parent 5a0f043 commit ff08a11
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 21 deletions.
58 changes: 38 additions & 20 deletions .tav.yml
Original file line number Diff line number Diff line change
Expand Up @@ -467,14 +467,20 @@ aws-sdk:
- node test/instrumentation/modules/aws-sdk/dynamodb.test.js

'@aws-sdk/client-s3':
versions:
# - 3.377.0 was a bad release (https://github.com/open-telemetry/opentelemetry-js-contrib/issues/1828#issuecomment-1834276719)
mode: max-7
include: '>=3.15.0 <4'
exclude: '3.377.0'
commands:
- node test/instrumentation/modules/@aws-sdk/client-s3.test.js
node: '>=14'
- versions:
# - 3.377.0 was a bad release (https://github.com/open-telemetry/opentelemetry-js-contrib/issues/1828#issuecomment-1834276719)
mode: max-5
include: '>=3.15.0 <3.723.0'
exclude: '3.377.0'
node: '>=14'
commands:
- node test/instrumentation/modules/@aws-sdk/client-s3.test.js
- versions:
mode: max-5
include: '>=3.723.0 <4'
node: '>=18'
commands:
- node test/instrumentation/modules/@aws-sdk/client-s3.test.js

'@aws-sdk/client-dynamodb':
versions:
Expand All @@ -485,20 +491,32 @@ aws-sdk:
node: '>=14'

'@aws-sdk/client-sns':
versions:
mode: max-7
include: '>=3.15.0 <4'
commands:
- node test/instrumentation/modules/@aws-sdk/client-sns.test.js
node: '>=14'
- versions:
mode: max-7
include: '>=3.15.0 <3.723.0'
node: '>=14'
commands:
- node test/instrumentation/modules/@aws-sdk/client-sns.test.js
- versions:
mode: max-5
include: '>=3.723.0 <4'
node: '>=18'
commands:
- node test/instrumentation/modules/@aws-sdk/client-sns.test.js

'@aws-sdk/client-sqs':
versions:
mode: max-7
include: '>=3.15.0 <4'
commands:
- node test/instrumentation/modules/@aws-sdk/client-sqs.test.js
node: '>=14'
- versions:
mode: max-7
include: '>=3.15.0 <3.723.0'
node: '>=14'
commands:
- node test/instrumentation/modules/@aws-sdk/client-sqs.test.js
- versions:
mode: max-5
include: '>=3.723.0 <4'
node: '>=18'
commands:
- node test/instrumentation/modules/@aws-sdk/client-sqs.test.js

# - [email protected] added its diagnostics_channel support.
# - In [email protected] the `request.origin` property was added, which we need
Expand Down
18 changes: 18 additions & 0 deletions CHANGELOG.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,24 @@ Notes:
See the <<upgrade-to-v4>> guide.
==== Unreleased
[float]
===== Breaking changes
[float]
===== Features
[float]
===== Bug fixes
* Fix instrumentation of `@aws-sdk/client-s3`, `@aws-sdk/client-sqs`, and
`@aws-sdk/client-sns` for versions 3.723.0 and later. (Internally the AWS SDK
clients updated to `@smithy/smithy-client@4`.)
[float]
===== Chores
[[release-notes-4.10.0]]
==== 4.10.0 - 2024/12/24
Expand Down
2 changes: 1 addition & 1 deletion lib/instrumentation/modules/@smithy/smithy-client.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ module.exports = function (mod, agent, { name, version, enabled }) {
// `@smithy/` npm org.
if (
name === '@smithy/smithy-client' &&
!semver.satisfies(version, '>=1 <4')
!semver.satisfies(version, '>=1 <5')
) {
agent.logger.debug(
'cannot instrument @aws-sdk/client-*: @smithy/smithy-client version %s not supported',
Expand Down

0 comments on commit ff08a11

Please sign in to comment.