aws / aws-xray-sdk-node

The official AWS X-Ray SDK for Node.js.
Apache License 2.0
267 stars 156 forks source link

[ aws-xray-sdk-fastify] Typo of FastityLoggerInstance AND aws-sdk dependency absent #587

Closed vaibhavgupta-bst closed 1 year ago

vaibhavgupta-bst commented 1 year ago

After installing aws-xray-sdk-fastify^3.5.0 and using it as plugin, I got a few errors and below are my queries for the same

  1. There's no attribute FastityLoggerInstance in fastify instead it should have been FastifyLoggerInstance [ aws-xray-sdk-fastify/lib/plugin.d.ts ]? image

  2. aws-sdk dependency is not present [ aws-xray-sdk-fastify/lib/private/configure-aws-x-ray-sync.js ] image

carolabadeer commented 1 year ago

Hi @vaibhavgupta-bst, thank you for creating this issue and bringing this to our attention! I have created a PR (#589) to fix the typo you pointed out in FastifyLoggerInstance.

Regarding the second issue you mentioned, we take a direct dependency on the aws-sdk package in the root package.json, but not in the sub-packages contained within this SDK. Since the direct dependency is in the root package.json, all packages contained within this monorepo will pull their dependencies from there and add on the dependencies in their respective package.json. You'll notice that's also the case for the aws-xray-sdk-core package, which contains all the AWS SDK and HTTP instrumentation logic (AWSXRay.captureAWS function).