Skip to content

Commit 9e52277

Browse files
committed
added comment to explain fix
1 parent b0c3323 commit 9e52277

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

packages/tracing/src/Tracer.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,9 @@ class Tracer implements TracerInterface {
261261
return this.provider.captureAWSClient(service);
262262
} catch (error) {
263263
try {
264+
// This is needed because some aws-sdk clients like AWS.DynamoDB.DocumentDB don't comply with the same
265+
// instrumentation contract like most base clients.
266+
// For detailed explanation see: https://github.com/awslabs/aws-lambda-powertools-typescript/issues/524#issuecomment-1024493662
264267
this.provider.captureAWSClient((service as unknown as T & { service: T }).service);
265268

266269
return service;

0 commit comments

Comments
 (0)