wongtp opened a new pull request, #666:
URL: https://github.com/apache/skywalking-java/pull/666

   ### Optimize service conflict error message
   see like [intercept 
failure](https://github.com/apache/skywalking/issues/10991), sometimes the 
service conflict will print the error message to the skywalking-api.log, but 
not enough to find which service conflict.
   
   before optimize
   ```
   INFO 2024-01-18 13:41:21.946 main SkyWalkingAgent : Skywalking agent 
transformer has installed. 
   ERROR 2024-01-18 13:41:22.270 main SkyWalkingAgent : Skywalking agent boot 
failure. 
   org.apache.skywalking.apm.agent.core.boot.ServiceConflictException: Service 
class 
org.apache.skywalking.apm.plugin.cpu.policy.TraceSamplerCpuPolicyExtendService 
overrides conflict, exist more than one service want to override :class 
org.apache.skywalking.apm.agent.core.sampling.SamplingService
        at 
org.apache.skywalking.apm.agent.core.boot.ServiceManager.loadAllServices(ServiceManager.java:89)
        at 
org.apache.skywalking.apm.agent.core.boot.ServiceManager.boot(ServiceManager.java:42)
        at 
org.apache.skywalking.apm.agent.SkyWalkingAgent.premain(SkyWalkingAgent.java:142)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at 
sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:386)
        at 
sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:401)
   ```
   
   after optimize
   ```
   INFO 2024-01-18 22:21:14.458 main SkyWalkingAgent : Skywalking agent 
transformer has installed. 
   ERROR 2024-01-18 22:21:14.754 main SkyWalkingAgent : Skywalking agent boot 
failure. 
   org.apache.skywalking.apm.agent.core.boot.ServiceConflictException: Service 
class 
org.apache.skywalking.apm.plugin.cpu.policy.TraceSamplerCpuPolicyExtendService 
overrides conflict, more then one service found, service[class 
org.apache.skywalking.apm.agent.core.sampling.SamplingService] want to 
override[class 
org.apache.skywalking.apm.plugin.trace.ignore.TraceIgnoreExtendService], please 
check your plugins
        at 
org.apache.skywalking.apm.agent.core.boot.ServiceManager.loadAllServices(ServiceManager.java:92)
        at 
org.apache.skywalking.apm.agent.core.boot.ServiceManager.boot(ServiceManager.java:42)
        at 
org.apache.skywalking.apm.agent.SkyWalkingAgent.premain(SkyWalkingAgent.java:111)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at 
sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:386)
        at 
sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:401)
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to