diff --git a/src/docs/getting-started/lambda/lambda-js.mdx b/src/docs/getting-started/lambda/lambda-js.mdx index 74b3a65e6..faf43f070 100644 --- a/src/docs/getting-started/lambda/lambda-js.mdx +++ b/src/docs/getting-started/lambda/lambda-js.mdx @@ -19,6 +19,8 @@ The AWS managed Lambda layer for ADOT JavaScript provides a plug and play user e The Lambda layer supports Node.JS v14+ Lambda runtimes. For more information about supported JavaScript and Node.JS versions, see the [OpenTelemetry JavaScript documentation](https://github.com/open-telemetry/opentelemetry-js). +For *TypeScript users*, if you are using `esbuild` (either directly or through tools such as the AWS CDK), you *must* export your handler function through `module.exports` rather than with the `export` keyword! The AWS mananaged layer for ADOT JavaScript needs to hot-patch your handler at runtime, but can't because `esbuild` makes your handler immutable when using the `export` keyword. + ### Add the ARN of the Lambda Layer In this section, we consume the Lambda layer for use with Node.JS Lambda Functions. This includes a reduced version of the [AWS Distro for OpenTelemetry Collector (ADOT Collector)](https://github.com/aws-observability/aws-otel-collector), which runs as a Lambda extension.