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

Double Server span create by lambda instrumentation #10931

Closed
cleverchuk opened this issue Mar 21, 2024 · 3 comments · Fixed by #10942
Closed

Double Server span create by lambda instrumentation #10931

cleverchuk opened this issue Mar 21, 2024 · 3 comments · Fixed by #10942
Assignees
Labels
bug Something isn't working

Comments

@cleverchuk
Copy link
Contributor

cleverchuk commented Mar 21, 2024

Describe the bug

This relates to this issue. The bug still exists when running on Java 8 or 11 lambda runtimes. One thing that's different is the customer class loader is lambdainternal.CustomerClassLoader which is different from com.amazonaws.services.lambda.runtime.api.client.CustomerClassLoader

Steps to reproduce

Deploy and invoke a sqs lambda handler with the javaagent. Ensure the handler name has ::handleRequest suffix and not just the class name.

Expected behavior

Only one server span.

Actual behavior

Two server spans were created

Javaagent or library instrumentation version

2.2.0

Environment

JDK: 8 and 11
OS: linux

Additional context

No response

@cleverchuk cleverchuk added bug Something isn't working needs triage New issue that requires triage labels Mar 21, 2024
@laurit
Copy link
Contributor

laurit commented Mar 22, 2024

cc @tylerbenson

@serkan-ozal
Copy link
Contributor

@laurit @tylerbenson I think I can take this one if no one has started working on it. We also need to add lambdainternal package prefix in addition to com.amazonaws.services.lambda.runtime.api.client prefix to be skipped for handler instrumentation.

@serkan-ozal
Copy link
Contributor

@laurit @tylerbenson Here it is: #10942
I have also made simple hacks to get the AWS Lambda runtime internal classes directly from AWS Lambda environment to be sure that we are not missing anything.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
4 participants