Skip to content

Commit ff08a11

Browse files
authored
fix: instrumentation of @aws-sdk/client-* v3.723.0 and later now works (#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.
1 parent 5a0f043 commit ff08a11

File tree

3 files changed

+57
-21
lines changed

3 files changed

+57
-21
lines changed

.tav.yml

+38-20
Original file line numberDiff line numberDiff line change
@@ -467,14 +467,20 @@ aws-sdk:
467467
- node test/instrumentation/modules/aws-sdk/dynamodb.test.js
468468

469469
'@aws-sdk/client-s3':
470-
versions:
471-
# - 3.377.0 was a bad release (https://github.com/open-telemetry/opentelemetry-js-contrib/issues/1828#issuecomment-1834276719)
472-
mode: max-7
473-
include: '>=3.15.0 <4'
474-
exclude: '3.377.0'
475-
commands:
476-
- node test/instrumentation/modules/@aws-sdk/client-s3.test.js
477-
node: '>=14'
470+
- versions:
471+
# - 3.377.0 was a bad release (https://github.com/open-telemetry/opentelemetry-js-contrib/issues/1828#issuecomment-1834276719)
472+
mode: max-5
473+
include: '>=3.15.0 <3.723.0'
474+
exclude: '3.377.0'
475+
node: '>=14'
476+
commands:
477+
- node test/instrumentation/modules/@aws-sdk/client-s3.test.js
478+
- versions:
479+
mode: max-5
480+
include: '>=3.723.0 <4'
481+
node: '>=18'
482+
commands:
483+
- node test/instrumentation/modules/@aws-sdk/client-s3.test.js
478484

479485
'@aws-sdk/client-dynamodb':
480486
versions:
@@ -485,20 +491,32 @@ aws-sdk:
485491
node: '>=14'
486492

487493
'@aws-sdk/client-sns':
488-
versions:
489-
mode: max-7
490-
include: '>=3.15.0 <4'
491-
commands:
492-
- node test/instrumentation/modules/@aws-sdk/client-sns.test.js
493-
node: '>=14'
494+
- versions:
495+
mode: max-7
496+
include: '>=3.15.0 <3.723.0'
497+
node: '>=14'
498+
commands:
499+
- node test/instrumentation/modules/@aws-sdk/client-sns.test.js
500+
- versions:
501+
mode: max-5
502+
include: '>=3.723.0 <4'
503+
node: '>=18'
504+
commands:
505+
- node test/instrumentation/modules/@aws-sdk/client-sns.test.js
494506

495507
'@aws-sdk/client-sqs':
496-
versions:
497-
mode: max-7
498-
include: '>=3.15.0 <4'
499-
commands:
500-
- node test/instrumentation/modules/@aws-sdk/client-sqs.test.js
501-
node: '>=14'
508+
- versions:
509+
mode: max-7
510+
include: '>=3.15.0 <3.723.0'
511+
node: '>=14'
512+
commands:
513+
- node test/instrumentation/modules/@aws-sdk/client-sqs.test.js
514+
- versions:
515+
mode: max-5
516+
include: '>=3.723.0 <4'
517+
node: '>=18'
518+
commands:
519+
- node test/instrumentation/modules/@aws-sdk/client-sqs.test.js
502520

503521
# - [email protected] added its diagnostics_channel support.
504522
# - In [email protected] the `request.origin` property was added, which we need

CHANGELOG.asciidoc

+18
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,24 @@ Notes:
3333
3434
See the <<upgrade-to-v4>> guide.
3535
36+
==== Unreleased
37+
38+
[float]
39+
===== Breaking changes
40+
41+
[float]
42+
===== Features
43+
44+
[float]
45+
===== Bug fixes
46+
47+
* Fix instrumentation of `@aws-sdk/client-s3`, `@aws-sdk/client-sqs`, and
48+
`@aws-sdk/client-sns` for versions 3.723.0 and later. (Internally the AWS SDK
49+
clients updated to `@smithy/smithy-client@4`.)
50+
51+
[float]
52+
===== Chores
53+
3654
[[release-notes-4.10.0]]
3755
==== 4.10.0 - 2024/12/24
3856

lib/instrumentation/modules/@smithy/smithy-client.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ module.exports = function (mod, agent, { name, version, enabled }) {
110110
// `@smithy/` npm org.
111111
if (
112112
name === '@smithy/smithy-client' &&
113-
!semver.satisfies(version, '>=1 <4')
113+
!semver.satisfies(version, '>=1 <5')
114114
) {
115115
agent.logger.debug(
116116
'cannot instrument @aws-sdk/client-*: @smithy/smithy-client version %s not supported',

0 commit comments

Comments
 (0)