Skip to content

Commit

Permalink
assigned shimName to v3 instrumentation to restore isWrapped function…
Browse files Browse the repository at this point in the history
…ality to pre v10 of agent
  • Loading branch information
bizob2828 committed Apr 27, 2023
1 parent c120871 commit 276b48d
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 10 deletions.
15 changes: 10 additions & 5 deletions merged/aws-sdk/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'
})
15 changes: 10 additions & 5 deletions merged/aws-sdk/nr-hooks.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'
}
]

Expand Down

0 comments on commit 276b48d

Please sign in to comment.