-
Notifications
You must be signed in to change notification settings - Fork 880
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
OpenTelemetry-agent conflicts with skywalking-agent,OpenTelemetry-agent overrode the modification logic of skywalking-agent to bytecode #7594
Comments
Hey @oswin886 , In general, we don't recommend or support using other javaagents together with the OTel javaagent. However, we will accept patches that fix these kind of issues (as long as they don't break anything important). |
@mateuszrzeszutek An interested behavior of OTel javaagent is, it seems intentional to retransfer the codes in the runtime, even SkyWalking's agent has done everything after OTel javaagent did in the booting stage. |
I think this might be the code responsible for enabling it: Lines 136 to 137 in 0ace238
(+ the jar manifest entries) |
(just linking to related #1534) |
Hey @mateuszrzeszutek , |
@oliver-zhang the default value for redefinition strategy is |
Fixes the issue described in #7887 Hopefully resolves #7594 We should not use cached `TypeDescription` for currently transformed class as the cached description will not be the same as newly created one if the class bytes were transformed. For example if another agent adds an interface to the class then returning the cached description that does not have that interface would result in bytebuddy removing that interface, see https://github.com/raphw/byte-buddy/blob/665a090c733c37339788cc5a1c441bd47fb77ef0/byte-buddy-dep/src/main/java/net/bytebuddy/dynamic/scaffold/TypeWriter.java#L5012
@oswin886 @oliver-zhang @wu-sheng try https://oss.sonatype.org/content/repositories/snapshots/io/opentelemetry/javaagent/opentelemetry-javaagent/1.24.0-SNAPSHOT/opentelemetry-javaagent-1.24.0-20230302.081319-55.jar and let us know whether this fixes the issue you had |
Yes, It's fixes |
Describe the bug
OpenTelemetry-agent conflicts with skywalking-agent,OpenTelemetry-agent overrode the modification logic of skywalking-agent to bytecode.
Steps to reproduce
Through pre-research, it is found that openTelemetry-agent and skywalking-agent have also enhanced the bytecode of the org.eclipse.jetty.server.HttpChannel file.Therefore, a test application jetty-demo based on jetty9 has been developed here.
Only install skywalking-agent, and then monitor the contents of the bytecode file of org.eclipse.jetty.server.HttpChannel in real time through arthas, as shown in the following figure.
-javaagent:D:\data\skywalking-agent\skywalking-agent.jar
Only install OpenTelemetry-agent, and then monitor the contents of the bytecode file of org.eclipse.jetty.server.HttpChannel in real time through arthas, as shown in the following figure.
-javaagent:D:\data\opentelemetry-javaagent.jar
Install openTelemetry-agent and skywalking-agent at the same time, and then monitor the contents of the bytecode file of org.eclipse.jetty.server.HttpChannel in real time through arthas, as shown in the following figure.
-javaagent:D:\data\skywalking-agent\skywalking-agent.jar -javaagent:D:\data\opentelemetry-javaagent.jar
.4.After the third step is completed, request the
/test
api and then monitor the contents of the bytecode file of org.eclipse.jetty.server.HttpChannel in real time through arthas, as shown in the following figure.If possible, provide a recipe for reproducing the error.
What did you expect to see?
OpenTelemetry-agent and skywalking-agent do not affect each other.
What did you see instead?
The jetty9.x plugin of skywalking-agent does not work.
What version are you using?
opentelemetry: v1.20.0
skywalking: v8.10.0
Environment
Compiler: JDK 1.8
OS: Windows10
test app: Jetty9
Additional context
other env: idea+maven3.8.6+arthas3.6.2.
Other plugins have similar situations, such as Tomcat9.x, Mysql5.x.
I(@oswin886) have put the test application and tools required for the reproduction in the opentelemetry-new-issue.zip package. In addition, I have communicated with the development engineer of the skywalking community. He(@wu-sheng) suggested that I submit an issue to the opentelemetry community. If you have any questions or other things I need to provide, please feed me or he(@wu-sheng) back as soon as possible.
opentelemetry-new-issue.zip
The text was updated successfully, but these errors were encountered: