Skip to content

Commit

Permalink
hmm
Browse files Browse the repository at this point in the history
  • Loading branch information
Ankcorn committed Mar 6, 2024
1 parent 4b538a5 commit 7561d50
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion sending-data/platforms/aws/aws-lambda/traces/node.js.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,12 @@ export async function handler(event) {
The [Node.js AWS SDK v3]([link](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/)) is not traced by default using OpenTelemetry on AWS Lambda when bundled as part of your function code. We currently support instrumentation for CommonJS codebases. We currently support instrumentation for CommonJS codebases. Use the following steps to enable tracing of the Node.js AWS SDK v3.

1. Mark `@smithy/middleware-stack` and `@aws-sdk/middleware-stack` as external.
2. Ensure these packages are installed into the node_modules folder of your lambda
2. Ensure your functions `.zip` file includes these dependencies

These packages are both extremely small and removing these from your bundle can also decrease your coldstarts

Follow the example below for popular serverless frameworks

+++ AWS CDK

Add the following config to your `lambda.NodejsFunction` settings
Expand Down

0 comments on commit 7561d50

Please sign in to comment.