-
Notifications
You must be signed in to change notification settings - Fork 874
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
Add agent option for adjust ByteBuddy redefinition strategy #7835
Add agent option for adjust ByteBuddy redefinition strategy #7835
Conversation
Signed-off-by: Yoon Kyong Sik <sam1287@gmail.com>
hi @KyongSik-Yoon! do all of the opentelemetry-javaagent tests still pass when using this option? |
I will comment after do that. |
@trask I was checked all test passing with this option. |
With this it would be possible to pass |
@laurit I find it strange that works while DISABLEDREDEFINITIONRETRANSFORM doesn't. These should affect only the initial transform of already loaded classes From your description it seems that when using the missing interface issue happens only sometimes, is this true? Any chance of building a reproducer for this? |
Only allowed retransformation or redefinition
|
I'm doing maintanance javaagent of APM product.
Recently, We have scheduled accpet OpenTelemetry data from various agent of them.
So I tried install our javaagent with otel javaagent.
It's purpose that fill not enough funtionality of each of them.
My javaagent add interface to HttpServletRequest and HttpServletResponse loading them to free class reference when use their method as like getParameter()
But When otel javaagent installed sametimes interface added by my agent was gone.
That's look like return to origin shape.
I'm tried to found root cause and workaround then I found below issue.
#7594
A reason is otel javaagent using ByteBuddy redeifne strategy is RETRANSFORM
It's works that instrument byte code after finish class loading.
So redefined class ignored after doing retransform.
Surely, ByteBuddy has three redefinition strategy. (NONE, RETRANSFORM, REDEFINITION)
When I set REDEFINITION strategy to AgentInstaller, otel agent and my agent working well together.
But I'm not sure how affect to opentelemetry agent entire range soI added agent option can adjust redefinition strategy.
We can expect user who want to use multiple agent setting this option.