From 8bd6e717778a060560862f2370db7b6eb3d4b1fd Mon Sep 17 00:00:00 2001 From: Instanacd PAT for GitHub Public Date: Tue, 19 May 2026 17:04:29 +0000 Subject: [PATCH 01/13] build: bumped @aws-sdk/client-dynamodb from 3.1045.0 to 3.1046.0 --- currencies.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/currencies.json b/currencies.json index e8c2e5ea4a..0168adfc09 100644 --- a/currencies.json +++ b/currencies.json @@ -73,7 +73,7 @@ "core": false, "versions": [ { - "v": "3.1045.0" + "v": "3.1046.0" } ] }, @@ -1331,4 +1331,4 @@ } ] } -] +] \ No newline at end of file From 4ea2b950334cef8cec4631453e39c39535c9a8e2 Mon Sep 17 00:00:00 2001 From: Instanacd PAT for GitHub Public Date: Tue, 19 May 2026 17:04:30 +0000 Subject: [PATCH 02/13] build: bumped @aws-sdk/client-kinesis from 3.1045.0 to 3.1046.0 --- currencies.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/currencies.json b/currencies.json index 0168adfc09..3fc85b87b0 100644 --- a/currencies.json +++ b/currencies.json @@ -89,7 +89,7 @@ "core": false, "versions": [ { - "v": "3.1045.0" + "v": "3.1046.0" } ] }, From 6adc16b81fcbfbc96101673a4fcd7658beb71f5d Mon Sep 17 00:00:00 2001 From: Instanacd PAT for GitHub Public Date: Tue, 19 May 2026 17:04:32 +0000 Subject: [PATCH 03/13] build: bumped @aws-sdk/client-kms from 3.1045.0 to 3.1046.0 --- currencies.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/currencies.json b/currencies.json index 3fc85b87b0..8ef8d64834 100644 --- a/currencies.json +++ b/currencies.json @@ -105,7 +105,7 @@ "core": false, "versions": [ { - "v": "3.1045.0" + "v": "3.1046.0" } ] }, From dfef20e4919ab964add661ada11c1bb633d059fd Mon Sep 17 00:00:00 2001 From: Instanacd PAT for GitHub Public Date: Tue, 19 May 2026 17:04:33 +0000 Subject: [PATCH 04/13] build: bumped @aws-sdk/client-lambda from 3.1045.0 to 3.1046.0 --- currencies.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/currencies.json b/currencies.json index 8ef8d64834..655a41b7f7 100644 --- a/currencies.json +++ b/currencies.json @@ -121,7 +121,7 @@ "core": false, "versions": [ { - "v": "3.1045.0" + "v": "3.1046.0" } ] }, From 14b8cc329b9924fb43d2bac4066280bd44cde342 Mon Sep 17 00:00:00 2001 From: Instanacd PAT for GitHub Public Date: Tue, 19 May 2026 17:04:35 +0000 Subject: [PATCH 05/13] build: bumped @aws-sdk/client-s3 from 3.1045.0 to 3.1046.0 --- currencies.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/currencies.json b/currencies.json index 655a41b7f7..6788199ea9 100644 --- a/currencies.json +++ b/currencies.json @@ -137,7 +137,7 @@ "core": false, "versions": [ { - "v": "3.1045.0" + "v": "3.1046.0" } ] }, From 5847ef59de09bdc5489f7788835f0e7759ab1224 Mon Sep 17 00:00:00 2001 From: Instanacd PAT for GitHub Public Date: Tue, 19 May 2026 17:04:37 +0000 Subject: [PATCH 06/13] build: bumped @aws-sdk/client-sns from 3.1045.0 to 3.1046.0 --- currencies.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/currencies.json b/currencies.json index 6788199ea9..25284b28b0 100644 --- a/currencies.json +++ b/currencies.json @@ -153,7 +153,7 @@ "core": false, "versions": [ { - "v": "3.1045.0" + "v": "3.1046.0" } ] }, From bcf8cd589382a032d9de1b5c65d143a5c08005ff Mon Sep 17 00:00:00 2001 From: Instanacd PAT for GitHub Public Date: Tue, 19 May 2026 17:04:38 +0000 Subject: [PATCH 07/13] build: bumped @aws-sdk/client-sqs from 3.1045.0 to 3.1046.0 --- currencies.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/currencies.json b/currencies.json index 25284b28b0..7acb8ab69c 100644 --- a/currencies.json +++ b/currencies.json @@ -169,7 +169,7 @@ "core": false, "versions": [ { - "v": "3.1045.0" + "v": "3.1046.0" } ] }, From 6360e74b921d4b77f27629f97c3fd590092977db Mon Sep 17 00:00:00 2001 From: Instanacd PAT for GitHub Public Date: Tue, 19 May 2026 17:04:40 +0000 Subject: [PATCH 08/13] build: bumped @aws-sdk/client-ssm from 3.1045.0 to 3.1046.0 --- currencies.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/currencies.json b/currencies.json index 7acb8ab69c..4396055d74 100644 --- a/currencies.json +++ b/currencies.json @@ -185,7 +185,7 @@ "core": false, "versions": [ { - "v": "3.1045.0" + "v": "3.1046.0" } ] }, From 4b960210465420013ab45bc84db3858d2f6f2350 Mon Sep 17 00:00:00 2001 From: Instanacd PAT for GitHub Public Date: Tue, 19 May 2026 17:04:41 +0000 Subject: [PATCH 09/13] build: bumped @aws-sdk/lib-dynamodb from 3.1045.0 to 3.1046.0 --- currencies.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/currencies.json b/currencies.json index 4396055d74..cbbf295add 100644 --- a/currencies.json +++ b/currencies.json @@ -201,7 +201,7 @@ "core": false, "versions": [ { - "v": "3.1045.0" + "v": "3.1046.0" } ] }, From 3554b94650b5d97d1d51f8b45821615e3062b009 Mon Sep 17 00:00:00 2001 From: Instanacd PAT for GitHub Public Date: Tue, 19 May 2026 17:05:07 +0000 Subject: [PATCH 10/13] build: bumped mssql from 12.5.2 to 12.5.3 --- currencies.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/currencies.json b/currencies.json index cbbf295add..430c9ee119 100644 --- a/currencies.json +++ b/currencies.json @@ -800,7 +800,7 @@ "core": false, "versions": [ { - "v": "12.5.2" + "v": "12.5.3" }, { "v": "10.0.4" From 7db73e88158c98b60dabaadb3bf400b96f178ce2 Mon Sep 17 00:00:00 2001 From: kirrg001 Date: Wed, 20 May 2026 14:50:53 +0200 Subject: [PATCH 11/13] chore: debug --- .../cloud/@aws-sdk/client-kinesis/test_base.js | 9 +-------- .../tracing/instrumentation/cloud/aws-sdk/v3/index.js | 11 ++++++++++- packages/core/src/util/requireHook.js | 1 + 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/packages/collector/test/integration/currencies/cloud/@aws-sdk/client-kinesis/test_base.js b/packages/collector/test/integration/currencies/cloud/@aws-sdk/client-kinesis/test_base.js index b580a3c2ea..8ba2641463 100644 --- a/packages/collector/test/integration/currencies/cloud/@aws-sdk/client-kinesis/test_base.js +++ b/packages/collector/test/integration/currencies/cloud/@aws-sdk/client-kinesis/test_base.js @@ -36,14 +36,7 @@ const operationsInfo = { }; const requestMethods = ['async', 'promise', 'cb', 'async-v2', 'promise-v2', 'cb-v2']; -const availableOperations = [ - 'createStream', - 'putRecords', - 'putRecord', - 'listStreams', - 'getRecords', - 'getShardIterator' -]; +const availableOperations = ['createStream']; const getNextCallMethod = require('@_local/core/test/test_util/circular_list').getCircularList(requestMethods); diff --git a/packages/core/src/tracing/instrumentation/cloud/aws-sdk/v3/index.js b/packages/core/src/tracing/instrumentation/cloud/aws-sdk/v3/index.js index 2e6dcd8590..19e952fb7e 100644 --- a/packages/core/src/tracing/instrumentation/cloud/aws-sdk/v3/index.js +++ b/packages/core/src/tracing/instrumentation/cloud/aws-sdk/v3/index.js @@ -42,6 +42,13 @@ exports.init = function init(config) { sqsConsumer.init(); + /** + * https://github.com/aws/aws-sdk-js-v3/releases/tag/v3.1046.0 + */ + // hook.onFileLoad(/@smithy\/core\/dist-cjs\/submodules\/client\/index\.js/, instrumentGlobalSmithy); + hook.onModuleLoad('@smithy/core/client', instrumentGlobalSmithy); + // hook.onModuleLoad('@aws-sdk/client-kinesis', instrumentGlobalSmithy); + /** * @aws-sdk/smithly-client >= 3.36.0 changed how the dist structure gets delivered * https://github.com/aws/aws-sdk-js-v3/blob/main/packages/smithy-client/CHANGELOG.md#3360-2021-10-08 @@ -73,7 +80,8 @@ exports.deactivate = function deactivate() { }; function instrumentGlobalSmithy(Smithy) { - shimmer.wrap(Smithy.Client.prototype, 'send', shimSmithySend); + console.log('hi', Smithy); + // shimmer.wrap(Smithy.Client.prototype, 'send', shimSmithySend); } function shimSmithySend(originalSend) { @@ -84,6 +92,7 @@ function shimSmithySend(originalSend) { const serviceId = self.config && self.config.serviceId; let awsProduct = serviceId && awsProductInstances.find(aws => aws.getServiceIdName() === serviceId.toLowerCase()); + if (awsProduct && awsProduct.supportsOperation(command.constructor.name)) { return awsProduct.instrumentedSmithySend(self, isActive, originalSend, smithySendArgs); } else { diff --git a/packages/core/src/util/requireHook.js b/packages/core/src/util/requireHook.js index d4c5310055..e1ffc959ce 100644 --- a/packages/core/src/util/requireHook.js +++ b/packages/core/src/util/requireHook.js @@ -153,6 +153,7 @@ function patchedModuleLoad(moduleName) { for (let i = 0; i < byFileNamePatternTransformers.length; i++) { if (byFileNamePatternTransformers[i].pattern.test(normalizedFilename)) { + console.log(filename, moduleExports); cacheEntry.moduleExports = byFileNamePatternTransformers[i].fn(cacheEntry.moduleExports, filename) || cacheEntry.moduleExports; } From f24e821b3dabd44d6773e98a230a98023b74bb93 Mon Sep 17 00:00:00 2001 From: kirrg001 Date: Wed, 20 May 2026 15:13:09 +0200 Subject: [PATCH 12/13] chore: fixes --- .../instrumentation/cloud/aws-sdk/v3/index.js | 24 +++++++++++++++---- packages/core/src/util/requireHook.js | 1 - 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/packages/core/src/tracing/instrumentation/cloud/aws-sdk/v3/index.js b/packages/core/src/tracing/instrumentation/cloud/aws-sdk/v3/index.js index 19e952fb7e..b97277897e 100644 --- a/packages/core/src/tracing/instrumentation/cloud/aws-sdk/v3/index.js +++ b/packages/core/src/tracing/instrumentation/cloud/aws-sdk/v3/index.js @@ -45,9 +45,7 @@ exports.init = function init(config) { /** * https://github.com/aws/aws-sdk-js-v3/releases/tag/v3.1046.0 */ - // hook.onFileLoad(/@smithy\/core\/dist-cjs\/submodules\/client\/index\.js/, instrumentGlobalSmithy); hook.onModuleLoad('@smithy/core/client', instrumentGlobalSmithy); - // hook.onModuleLoad('@aws-sdk/client-kinesis', instrumentGlobalSmithy); /** * @aws-sdk/smithly-client >= 3.36.0 changed how the dist structure gets delivered @@ -79,9 +77,25 @@ exports.deactivate = function deactivate() { isActive = false; }; -function instrumentGlobalSmithy(Smithy) { - console.log('hi', Smithy); - // shimmer.wrap(Smithy.Client.prototype, 'send', shimSmithySend); +/** + * The require hook can run once while `exports` is still `{}` (cyclic CJS load); `exports` is then the same object + * Node fills in later. Defer wrapping until after the current synchronous load completes. + */ +function instrumentGlobalSmithy(exports) { + const tryWrap = () => { + if (typeof exports.Client === 'function' && exports.Client.prototype) { + shimmer.wrap(exports.Client.prototype, 'send', shimSmithySend); + return true; + } + return false; + }; + + if (!tryWrap()) { + setImmediate(() => { + tryWrap(); + }); + } + return exports; } function shimSmithySend(originalSend) { diff --git a/packages/core/src/util/requireHook.js b/packages/core/src/util/requireHook.js index e1ffc959ce..d4c5310055 100644 --- a/packages/core/src/util/requireHook.js +++ b/packages/core/src/util/requireHook.js @@ -153,7 +153,6 @@ function patchedModuleLoad(moduleName) { for (let i = 0; i < byFileNamePatternTransformers.length; i++) { if (byFileNamePatternTransformers[i].pattern.test(normalizedFilename)) { - console.log(filename, moduleExports); cacheEntry.moduleExports = byFileNamePatternTransformers[i].fn(cacheEntry.moduleExports, filename) || cacheEntry.moduleExports; } From 6e90cf8ecfcf7947a20f4ae7367640fa2341ec81 Mon Sep 17 00:00:00 2001 From: kirrg001 Date: Wed, 20 May 2026 15:14:07 +0200 Subject: [PATCH 13/13] chore: cleanup --- .../cloud/@aws-sdk/client-kinesis/test_base.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/collector/test/integration/currencies/cloud/@aws-sdk/client-kinesis/test_base.js b/packages/collector/test/integration/currencies/cloud/@aws-sdk/client-kinesis/test_base.js index 8ba2641463..b580a3c2ea 100644 --- a/packages/collector/test/integration/currencies/cloud/@aws-sdk/client-kinesis/test_base.js +++ b/packages/collector/test/integration/currencies/cloud/@aws-sdk/client-kinesis/test_base.js @@ -36,7 +36,14 @@ const operationsInfo = { }; const requestMethods = ['async', 'promise', 'cb', 'async-v2', 'promise-v2', 'cb-v2']; -const availableOperations = ['createStream']; +const availableOperations = [ + 'createStream', + 'putRecords', + 'putRecord', + 'listStreams', + 'getRecords', + 'getShardIterator' +]; const getNextCallMethod = require('@_local/core/test/test_util/circular_list').getCircularList(requestMethods);