-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lambda: OTEL not working. Timeout when using adotInstrumentation
#26414
Comments
Does this happen when you create the lambda manually? Create the lambda as you would normally in the CDK, add the appropriate layer, and enable tracing following the instructions here: https://aws-otel.github.io/docs/getting-started/lambda/lambda-js |
Yes. It still fails. I discovered the actual error causing the timeout is I discovered this issue occurs because the Javascript emitted by
I think it would be a good idea to update the CDK docs to mention that you MUST use an cs module export when using |
Interesting! Technically, that's outside the bounds of the AWS CDK, but you're right that it should be clearly documented. It sounds like this also needs to be logged with the AWS OTEL Lambda layer team ( https://github.com/aws-observability/aws-otel-lambda ) so that they can clearly inform users. Turns out, they know this problem: aws-observability/aws-otel-lambda#99 This should be documented on both sides. |
I've opened a PR with the OTEL documentation: aws-otel/aws-otel.github.io#594 |
Closing this issue as not relevant to CDK. Please open a new one if any concerns. |
|
Describe the bug
Adding the
adotInstrumentation
property to a lambda function causes it to timeout. The function handler does not execute. I am following the example shown in the docs.Expected Behavior
Function should execute handler and not timeout.
Current Behavior
Function times-out without executing the function handler. See Reproduction Steps below for the code in-use.
Reproduction Steps
The following stack creates 2 function instances using the same handler code. The one with the
adotInstrumentation
fails with a timeout.Stack
Function code
Possible Solution
No response
Additional Information/Context
No response
CDK CLI Version
2.80.0
Framework Version
No response
Node.js Version
18
OS
MacOS
Language
Typescript
Language Version
No response
Other information
No response
The text was updated successfully, but these errors were encountered: