Issue #8641: Support a request wrapper for API Gateway V2 HTTP events#8642
Issue #8641: Support a request wrapper for API Gateway V2 HTTP events#8642azell wants to merge 6 commits intoopen-telemetry:mainfrom
Conversation
Ref: https://github.com/aws/aws-lambda-java-libs/blob/main/aws-lambda-java-events/RELEASE.CHANGELOG.md 2. Reuse the existing string parsing logic through a wrapper to support V1 and V2 APIs.
| // NB: 2.2.0 includes a class called SQSEvent but isn't usable due to it returning private classes | ||
| // in public API. | ||
| library("com.amazonaws:aws-lambda-java-events:2.2.1") | ||
| library("com.amazonaws:aws-lambda-java-events:3.9.0") |
There was a problem hiding this comment.
Does the javaagent instrumentation not work without bumping this?
There was a problem hiding this comment.
Good question, let me revert and run test target.
There was a problem hiding this comment.
Even if you revert this javaagent tests will still run with 3.9.0 beacuse 2.2.1 declared here is updated to 3.9.0 because of :instrumentation:aws-lambda:aws-lambda-events-2.2:testing. If you make the tests run with 2.2.1 they'll fail. The way I see it there are two options, either change the supported version 2.2 -> 3.9 everywhere (docs, package name, etc.) or figure out a way how to support both versions. That could involve having a separate instrumentation for 3.9 and extracting common code so that both 3.9 and 2.2 instrumentation could use it or using reflection.
|
This PR has been labeled as stale due to lack of activity. It will be automatically closed if there is no further activity over the next 14 days. |
Implementation and unit tests for the
TracingRequestApiGatewayV2Wrapperclass. Referencing the API Gateway V2 classes required updating com.amazonaws:aws-lambda-java-events to version 3.11.2.Some classes explicitly test for the API Gateway V1 classes. I extended these classes to also test for the API Gateway V2 classes.