Skip to content
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

aws-lambda: AdotLambdaExecWrapper is missing an element for /opt/otel-sqs-handler #30310

Closed
2 tasks
vchik795 opened this issue May 22, 2024 · 4 comments · Fixed by #30314
Closed
2 tasks

aws-lambda: AdotLambdaExecWrapper is missing an element for /opt/otel-sqs-handler #30310

vchik795 opened this issue May 22, 2024 · 4 comments · Fixed by #30314
Labels
@aws-cdk/aws-lambda Related to AWS Lambda effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. p2

Comments

@vchik795
Copy link

vchik795 commented May 22, 2024

Describe the feature

According to the OpenTelemetry documentation, the environment variable AWS_LAMBDA_EXEC_WRAPPER is supposed to be set to /opt/otel-sqs-handler for SQS-triggered Lambda handlers. However, there is no corresponding element for it in the AdotLambdaExecWrapper enum.

Use Case

When enabling ADOT instrumentation for an SQS-triggered Lambda function, there is no way to set the environment variable AWS_LAMBDA_EXEC_WRAPPER to /opt/otel-sqs-handler. And using the available /opt/otel-handler (REGULAR_HANDLER) leads to issues like this one.

Proposed Solution

Add a new element to the AdotLambdaExecWrapper enum that would support /opt/otel-sqs-handler.

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

CDK version used

2.139

Environment details (OS name and version, etc.)

N/A

@vchik795 vchik795 added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels May 22, 2024
@github-actions github-actions bot added the @aws-cdk/aws-lambda Related to AWS Lambda label May 22, 2024
@khushail khushail self-assigned this May 22, 2024
@khushail khushail added investigating This issue is being investigated and/or work is in progress to resolve the issue. and removed needs-triage This issue or PR still needs to be triaged. labels May 22, 2024
@khushail
Copy link
Contributor

Yes, @vchik795 , this enum -

export enum AdotLambdaExecWrapper {
needs to have the mentioned element.

PR from the community is welcome !

@khushail khushail added p2 effort/medium Medium work item – several days of effort and removed investigating This issue is being investigated and/or work is in progress to resolve the issue. labels May 22, 2024
@khushail khushail removed their assignment May 22, 2024
@vchik795
Copy link
Author

vchik795 commented Jun 4, 2024

Thank you for creating the pull request, @mazyu36. Do you think it is going to be merged any time soon?

@mazyu36
Copy link
Contributor

mazyu36 commented Jun 4, 2024

@vchik795
Thank you for your comment.
The PR is currently awaiting review from the community. While the review process will eventually progress and it will be merged, I'm not sure exactly when the review will take place.
I kindly ask that you wait for a little while.​​​​​​​​​​​​​​​​

@mergify mergify bot closed this as completed in #30314 Jul 26, 2024
mergify bot pushed a commit that referenced this issue Jul 26, 2024
…um (#30314)

### Issue # (if applicable)

Closes #30310 .

### Reason for this change
Missing enum option of `otel-sqs-handler`


### Description of changes
Add `SQS_HANDLER` option



### Description of how you validated changes
I verified that the correct values were set in the environment variables after deploying. Since only an enum option was added, I determined that adding unit tests or integration tests was unnecessary.



### Checklist
- [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md)

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Copy link

Comments on closed issues and PRs are hard for our team to see.
If you need help, please open a new issue that references this one.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 26, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
@aws-cdk/aws-lambda Related to AWS Lambda effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. p2
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants