Skip to content

Bug: tracer.captureAWSClient not working consistently with DynamoDB.DocumentClient  #524

Closed
@dreamorosi

Description

@dreamorosi

Bug description

As reported by @flochaz, while using JS, after patching an AWS.DynamoDB.DocumentClient like so:

const docClient = tracer.captureAWSClient(new dynamodb.DocumentClient());

trying to use the client like docClient.put() throws an error put is not a function.

In our e2e tests we are testing for the .scan() method which works as expected so further investigation is required.

Expected Behavior

Being able to use all the methods the client has after being captured.

Current Behavior

Client throws an error when using certain methods like put.

Possible Solution

N/A

Steps to Reproduce

See above.

Environment

  • Powertools version used: >=0.5.0
  • Packaging format (Layers, npm): npm with JS
  • AWS Lambda function runtime: N/A
  • Debugging logs: N/A

Related issues, RFCs

N/A

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingcompletedThis item is complete and has been merged/shippedtracerThis item relates to the Tracer Utility

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions