From 5c46aec8015670b42b2b814e218135e3db9aa586 Mon Sep 17 00:00:00 2001 From: Arya <90748009+aryamohanan@users.noreply.github.com> Date: Fri, 11 Oct 2024 18:14:22 +0530 Subject: [PATCH] chore: updated comments to reflect targeting of the next major release (#1379) --- packages/core/src/tracing/index.js | 2 +- .../tracing/instrumentation/cloud/aws-sdk/v3/index.js | 11 +++++------ packages/core/src/util/hook.js | 2 +- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/packages/core/src/tracing/index.js b/packages/core/src/tracing/index.js index b2e46beb35..e44b05a86c 100644 --- a/packages/core/src/tracing/index.js +++ b/packages/core/src/tracing/index.js @@ -181,7 +181,7 @@ exports.init = function init(_config, downstreamConnection, _processIdentityProv console.debug(`The App is using the following preload flags: ${preloadFlags}`); } - // Consider removing this in the next major release(v4.x) of the @instana package. + // Consider removing this in the next major release of the @instana package. if (hasExperimentalLoaderFlag()) { // eslint-disable-next-line no-console console.warn( 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 540e6b2bb0..debc5f57f1 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 @@ -84,12 +84,11 @@ function shimSmithySend(originalSend) { if (awsProduct && awsProduct.supportsOperation(command.constructor.name)) { return awsProduct.instrumentedSmithySend(self, isActive, originalSend, smithySendArgs); } else { - // This code can be removed once all AWS SDK v3 instrumentations have been refactored to use the new approach - // introduced in https://github.com/instana/nodejs/pull/838 for kinesis. That is: Do not use an explicit - // operationsInfo/operationsMap map that restricts the traced operations to a subset of possible operations, but - // instead allow _all_ operations to be traced, using the operation name from `command.constructor.name` for - // span.data.$spanName.op. We plan to finish this refactoring before or with the next major release (4.x) of the - // @instana packages. + // This logic should not be used in AWS SDK v4. All AWS SDK v4 instrumentations must use the new approach + // introduced in https://github.com/instana/nodejs/pull/838 for Kinesis. That is: Do not use an explicit + // operationsInfo/operationsMap that restricts the traced operations to a subset of possible operations. + // Instead, allow all operations to be traced using the operation name from `command.constructor.name` + // for span.data.$spanName.op. awsProduct = operationMap[smithySendArgs[0].constructor.name]; if (awsProduct) { return awsProduct.instrumentedSmithySend(self, isActive, originalSend, smithySendArgs); diff --git a/packages/core/src/util/hook.js b/packages/core/src/util/hook.js index 6a9662d25e..64383a8092 100644 --- a/packages/core/src/util/hook.js +++ b/packages/core/src/util/hook.js @@ -19,7 +19,7 @@ const isESMApp = require('./esm').isESMApp; * Offers support for all native ECMAScript Modules within ESM applications. * However, it does not provide support for modules loaded from CJS applications. * - * Note: In the next major release (4.x), we plan to transition all CJS modules in ESM applications to be + * Note: In the next major release, we might transition all CJS modules in ESM applications to be * supported with iitmHook. For now, this approach is chosen to minimize risk. */