-
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
fix(lambda): add instrument handler option to adotInstrumentation to support python lambda functions #26040
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The pull request linter has failed. See the aws-cdk-automation comment below for failure reasons. If you believe this pull request should receive an exemption, please comment and provide a justification.
A comment requesting an exemption should contain the text Exemption Request
. Additionally, if clarification is needed add Clarification Request
to a comment.
I need clarification. The aws-lambda README has a section on Adot Integration Tests but the file does not exist. I'm also not sure if an integration test is required on this update based on the nature of the change. If this all looks good I would ask for an |
I decided to add an integration test and updated the README but for the life of me cannot run the integration test locally. Can someone help me understand what the command would be to build up the integration testing runner and how to run it. Do integration tests belong in @aws-cdk-testing/framework-integ or in the packages/aws-cdk-lib/aws-lambda/test directory? I see integ.X in both places. |
… in the test directory of aws-lambda in aws-cdk-lib
✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.
… SDK EXEC_WRAPPER is using the INSTRUMENT_HANDLER enum value
… SDK EXEC_WRAPPER is using the INSTRUMENT_HANDLER enum value
… lambda functions when using Adot to force INSTRUMENT_HANDLER or throw error
…sing PYTHON and Adot layers. This is a destructive change as it will result in a destroy and recreate, but the side effect is that if anyone is already trying to use Python in Lambda and Adot with any handler that is not INSTRUMENT_HANDLER the layer doesn't work so no one should be impacted by this destructive change
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
I had to kick off the code build project again cause it was failing in an area I didn't touch. I reviewed the failure and couldn't see exactly why it was failing. Updating the branch fixed the codebuild failure. |
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
…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*
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
Closes #24666.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license