Closed carolabadeer closed 1 year ago
Merging #575 (4d072a6) into master (3abe727) will not change coverage. The diff coverage is
n/a
.:exclamation: Current head 4d072a6 differs from pull request most recent head 5013a65. Consider uploading reports for the commit 5013a65 to get more accurate results
@@ Coverage Diff @@
## master #575 +/- ##
=======================================
Coverage 83.38% 83.38%
=======================================
Files 37 37
Lines 1794 1794
=======================================
Hits 1496 1496
Misses 298 298
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.
Hi, when is your next release lined up? Could really use this :)
Issue #, if available: #439, #547
Description of changes: This PR updates the TypeScript definition of
captureAWSv3Client
to fix errors reported by customers in the issues above:This error was due to an incompatibility between the
middlewareStack
types used by theClient
type defined in the@aws-sdk/types
package. The root cause behind this incompatibility is conflicting nested versions of the@aws-sdk/types
package being used in this repo. These versions can be verified using the following command:Which currently produces the following output:
To fix the error reported above, a minimal type can be used to extract the
middlewareStack
from the AWS client being passed intocaptureAWSv3client
. This will ensure thatmiddlewareStack.use
andmiddlewareStack.remove
exist on the client (which are the necessary components for the implementation) while avoiding the minor version incompatibilities between their types.This change was tested using the following sample app:
Prior to the changes, the
const instrumentedClient = captureAWSv3Client(dynamoDBClient, segment)
generated the error reported above. The error no longer persists after these changes.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.