[Serverless] Add remaining event metadata attributes#2740
Merged
sharvath-newrelic merged 1 commit intoserverless-modefrom Feb 20, 2026
Merged
[Serverless] Add remaining event metadata attributes#2740sharvath-newrelic merged 1 commit intoserverless-modefrom
sharvath-newrelic merged 1 commit intoserverless-modefrom
Conversation
| EVENT_EXTRACTORS.put(APIGatewayProxyRequestEvent.class, (event, txn) -> extractAPIGatewayProxyMetadata((APIGatewayProxyRequestEvent) event, txn)); | ||
| EVENT_EXTRACTORS.put(APIGatewayV2HTTPEvent.class, (event, txn) -> extractAPIGatewayV2HTTPMetadata((APIGatewayV2HTTPEvent) event, txn)); | ||
| EVENT_EXTRACTORS.put(CloudFrontEvent.class, (event, txn) -> extractCloudFrontMetadata((CloudFrontEvent) event, txn)); | ||
| } |
Contributor
Author
There was a problem hiding this comment.
This approach might be overkill, but perhaps preferable to a chunky if/else statement.
obenkenobi
approved these changes
Feb 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
This PR enhances AWS Lambda event metadata extraction by adding comprehensive attribute collection for all supported Lambda event types based on the details outlined in the Lambda spec. Several new attributes constants have been added, along with a map-based dispatcher pattern for cleaner event type handling. I've also broken up the extraction logic monolith into dedicated methods per event type.
Related Github Issue
Resolves #2733
Testing
Several unit tests have been added to provide coverage for all supported event types. Performance tests have been included in the java-agent/sample-apps repo to expand e2e testing.