-
Notifications
You must be signed in to change notification settings - Fork 867
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
Use VirtualField for associating netty listener with wrapper #5282
Conversation
.../java/io/opentelemetry/javaagent/instrumentation/internal/lambda/Java9LambdaTransformer.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't follow the connection to skipping transforming lambdas of injected helper classes?
@trask I should have added a comment for this. As far as I understand we don't transform helper classes, so not transforming their lambdas should really be the expected behaviour. Transforming lambdas of helper classes can fail because some bytebuddy matcher tries to resolved the class file of containing class of lambda, which does not exist, because it is an injected class. We make tests fail when there is a transformation failure. Adding a virtual field for |
oh, i c, and non-lambda injected classes are skipped already because they live under "io.opentelemetry.javaagent.shaded" which we skip in would it work to move the |
I thought it was because the injection happens during transformation and transformation isn't re-entered. Only helper classes from library modules have "shaded". |
oh of course, I forgot that |
oh yes, and this:
and I missed that the check isn't whether the lambda class itself is a helper class, but rather it's whether the lambda's btw, what is the thx 😅 |
|
…lemetry#5282) * Use VirtualField for associating netty listener with wrapper * Move ignoring lambas for injected classes to LambdaTransformer
Probably resolves #5265
To support removing netty listeners we need to be able to find the wrapper that we register instead of the original listener from the original listener. Currently we use a static weak cache for it. Removal of the elements from this cache depends on the gc, which might confuse users who inspect the heap dump and make them suspect that there is a memory leak.