-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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: AdotLambdaExecWrapper is incorrect for Python #24666
Comments
Yes I can see the document requires Making this a p2. Any PR is highly welcome and appreciated! |
…support python lambda functions (#26040) Small change to add an enum value to AdotLambdaExecWrapper. The python layer for adot requires the path *'/opt/otel-instrument'* which differs from the layer needed for other languages which is *'/opt/otel-handler'*. In the link below in the section **Enable auto-instrumentation for your Lambda function** step 5 requires the *'/opt/otel-instrument'* path. The existing work around is to provide a lambda layer yourself and the appropriate env variable for *AWS_LAMBDA_EXEC_WRAPPER* without using the adotInstrumentation parameters. This fix simplifies dev requirements. [Python Lambda Otel](https://aws-otel.github.io/docs/getting-started/lambda/lambda-python) Closes #24666. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
|
…support python lambda functions (aws#26040) Small change to add an enum value to AdotLambdaExecWrapper. The python layer for adot requires the path *'/opt/otel-instrument'* which differs from the layer needed for other languages which is *'/opt/otel-handler'*. In the link below in the section **Enable auto-instrumentation for your Lambda function** step 5 requires the *'/opt/otel-instrument'* path. The existing work around is to provide a lambda layer yourself and the appropriate env variable for *AWS_LAMBDA_EXEC_WRAPPER* without using the adotInstrumentation parameters. This fix simplifies dev requirements. [Python Lambda Otel](https://aws-otel.github.io/docs/getting-started/lambda/lambda-python) Closes aws#24666. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Describe the bug
The ADOT Lambda auto-instrumentation does not work for python function, as the exec wrapper does not match the expected values for python adot
Expected Behavior
As per the ADOT documentation on auto-instumenting a python lambda function, the
AWS_LAMBDA_EXEC_WRAPPER
envar should be set to the value/opt/otel-instrument
.Current Behavior
The envar is set to one of 3 values, per the enum:
Reproduction Steps
Possible Solution
/opt/otel-instrument
Additional Information/Context
https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.AdotInstrumentationConfig.html
CDK CLI Version
2.69
Framework Version
No response
Node.js Version
n/a
OS
n/a
Language
Typescript
Language Version
No response
Other information
No response
The text was updated successfully, but these errors were encountered: