aws / aws-xray-sdk-node

The official AWS X-Ray SDK for Node.js.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

captureAWSv3Client doesn't support SecretManager client

shazi57 opened this issue · comments

Hello I've been using Tracer from AWS powertools, and I noticed captureAWSv3Client method does not support SecretManager client. I am using typescript, so I tried to follow the workaround to cast the client as any, but it made no difference.

Screen Shot 2023-07-25 at 2 40 51 AM

Basically in my custom model class, I set wrap the client with x-ray based on the tracer parameter passed into the constructor. This strategy worked with my custom class for DynamoDB, but it doesn't work with SecretManager. I tried to find if it's a known issue, but looks like none of the captureAWSclient issues are pointing specifically to SecretManager client, so I am opening this issue. If there's already solution for this, please let me know and I'll close the issue.

Hi @shazi57, which version of the X-Ray Node SDK are you using? Can you give more insight into what exactly isn't working?

Hi @shazi57, maintainer of Powertools here.

You can capture AWS SDK v3 clients by calling directly tracer.captureAWSv3Client(new SecretsManager({})) and it should work. The provider method is intended as escape hatch for those methods that are not supported by Powertools.

For future reference also, when the issue is related to Powertools, feel free to open an issue directly on our repository, the Powertools team doesn't actively monitor this repo so our replies might be delayed here.

Thanks for the followup, @dreamorosi! Resolving this issue as no further action is necessary