Using `captureAWSClient` over directly referenced dynamodb client fails
Open
enhancement
- Dominant language
- JavaScript
- Stars
- 280
- Forks
- 157
- PR merge metrics
- No merged PRs in 30d
Description
The following code does not work:
```js
const DynamoDB = require('aws-sdk/clients/dynamodb')
const xray = require('aws-xray-sdk-core')
const ddb = xray.captureAWSClient(new DynamoDB())
```
In theory, it should be just the same as encapsulating `new AWS.DynamoDB()` coming straight from `aws-sdk`, but it does not work.
This is specially problematic in AWS Lambda environment, where loading more than you need makes you use more memory and more time.
Contributor guide
Assessment
This issue has not been assessed yet.