Skip to content

Support AWS Lambda parent inheritance#5089

Merged
DarcyRaynerDD merged 15 commits into
masterfrom
darcy.rayner/support-lambda-multiparent
Apr 25, 2023
Merged

Support AWS Lambda parent inheritance#5089
DarcyRaynerDD merged 15 commits into
masterfrom
darcy.rayner/support-lambda-multiparent

Conversation

@DarcyRaynerDD

@DarcyRaynerDD DarcyRaynerDD commented Apr 19, 2023

Copy link
Copy Markdown
Contributor

What Does This Do

Fixes a bug with Lambda span generation, when using an abstract base class.
Also fixes a bug where com.amazonaws.services.lambda.runtime.RequestStreamHandler was not being wrapped correctly, because it has a void return type, which the ExtensionAdvice class wasn't matching properly. I've added a test case for this.

Before:
Screenshot 2023-04-19 at 5 04 24 PM
After:
Screenshot 2023-04-19 at 4 52 58 PM

Motivation

If a customer creates an Abstract Base Class, which implements the com.amazonaws.services.lambda.runtime.RequestHandler, currently our instrumentation won't correctly wrap the handleRequest method, leading to broken traces. This changes the instrumentation matcher to find all classes in the hierachy which implement the RequestHandler interface.

Additional Notes

@DarcyRaynerDD
DarcyRaynerDD requested a review from a team as a code owner April 19, 2023 21:08
@maxday
maxday self-requested a review April 24, 2023 18:23

@maxday maxday left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@maxday
maxday self-requested a review April 24, 2023 18:23
@bantonsson

Copy link
Copy Markdown
Contributor

@DarcyRaynerDD could you please squash the commits when you merge the PR?

@DarcyRaynerDD
DarcyRaynerDD merged commit 9ec7ae5 into master Apr 25, 2023
@DarcyRaynerDD
DarcyRaynerDD deleted the darcy.rayner/support-lambda-multiparent branch April 25, 2023 17:52
@github-actions github-actions Bot added this to the 1.13.0 milestone Apr 25, 2023
@richardstartin richardstartin added the inst: aws lambda AWS Lambda instrumentation label May 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

inst: aws lambda AWS Lambda instrumentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants