Skip to content
This repository was archived by the owner on Oct 31, 2024. It is now read-only.

Commit 3501aad

Browse files
author
Amir Blum
committed
feat(plugin-aws-sdk): bind context to callback on request.send
1 parent c60a08b commit 3501aad

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/plugin-aws-sdk/src/aws-sdk.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,9 @@ class AwsPlugin extends BasePlugin<typeof AWS> {
142142
thisPlugin._callPreRequestHooks(span, awsRequest);
143143
thisPlugin._registerCompletedEvent(span, awsRequest);
144144

145+
const callbackWithContext = thisPlugin._tracer.bind(callback, span);
145146
return thisPlugin._tracer.withSpan(span, () => {
146-
return original.call(awsRequest, callback);
147+
return original.call(awsRequest, callbackWithContext);
147148
});
148149
};
149150
}

0 commit comments

Comments
 (0)