From 276b48d07ed88da77c7fe24d1cbc9518cf2c6628 Mon Sep 17 00:00:00 2001 From: Bob Evans Date: Thu, 27 Apr 2023 14:55:43 -0400 Subject: [PATCH] assigned shimName to v3 instrumentation to restore isWrapped functionality to pre v10 of agent --- merged/aws-sdk/index.js | 15 ++++++++++----- merged/aws-sdk/nr-hooks.js | 15 ++++++++++----- 2 files changed, 20 insertions(+), 10 deletions(-) diff --git a/merged/aws-sdk/index.js b/merged/aws-sdk/index.js index 32b7a035e0..353701b50a 100644 --- a/merged/aws-sdk/index.js +++ b/merged/aws-sdk/index.js @@ -15,21 +15,26 @@ newrelic.instrumentConglomerate('aws-sdk', require('./lib/v2/instrumentation')) newrelic.instrument({ moduleName: '@aws-sdk/smithy-client', - onResolved: require('./lib/v3/smithy-client') + onResolved: require('./lib/v3/smithy-client'), + shimName: 'aws-sdk' }) newrelic.instrumentMessages({ moduleName: '@aws-sdk/client-sns', - onResolved: require('./lib/v3/sns') + onResolved: require('./lib/v3/sns'), + shimName: 'aws-sdk' }) newrelic.instrumentMessages({ moduleName: '@aws-sdk/client-sqs', - onResolved: require('./lib/v3/sqs') + onResolved: require('./lib/v3/sqs'), + shimName: 'aws-sdk' }) newrelic.instrumentDatastore({ moduleName: '@aws-sdk/client-dynamodb', - onResolved: require('./lib/v3/client-dynamodb') + onResolved: require('./lib/v3/client-dynamodb'), + shimName: 'aws-sdk' }) newrelic.instrumentDatastore({ moduleName: '@aws-sdk/lib-dynamodb', - onResolved: require('./lib/v3/lib-dynamodb') + onResolved: require('./lib/v3/lib-dynamodb'), + shimName: 'aws-sdk' }) diff --git a/merged/aws-sdk/nr-hooks.js b/merged/aws-sdk/nr-hooks.js index f04408e16d..31e569264d 100644 --- a/merged/aws-sdk/nr-hooks.js +++ b/merged/aws-sdk/nr-hooks.js @@ -14,27 +14,32 @@ const instrumentations = [ { type: 'generic', moduleName: '@aws-sdk/smithy-client', - onResolved: require('./lib/v3/smithy-client') + onResolved: require('./lib/v3/smithy-client'), + shimName: 'aws-sdk' }, { type: 'message', moduleName: '@aws-sdk/client-sns', - onResolved: require('./lib/v3/sns') + onResolved: require('./lib/v3/sns'), + shimName: 'aws-sdk' }, { type: 'message', moduleName: '@aws-sdk/client-sqs', - onResolved: require('./lib/v3/sqs') + onResolved: require('./lib/v3/sqs'), + shimName: 'aws-sdk' }, { type: 'datastore', moduleName: '@aws-sdk/client-dynamodb', - onResolved: require('./lib/v3/client-dynamodb') + onResolved: require('./lib/v3/client-dynamodb'), + shimName: 'aws-sdk' }, { type: 'datastore', moduleName: '@aws-sdk/lib-dynamodb', - onResolved: require('./lib/v3/lib-dynamodb') + onResolved: require('./lib/v3/lib-dynamodb'), + shimName: 'aws-sdk' } ]