Class DubboInterceptor

java.lang.Object
org.apache.skywalking.apm.plugin.asf.dubbo.DubboInterceptor
All Implemented Interfaces:
org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.InstanceMethodsAroundInterceptor

public class DubboInterceptor extends Object implements org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.InstanceMethodsAroundInterceptor
DubboInterceptor define how to enhance class MonitorFilter.invoke(Invoker, Invocation). the trace context transport to the provider side by RpcContext.attachments.but all the version of dubbo framework below 2.8.3 don't support RpcContext.attachments, we support another way to support it.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    afterMethod(org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.EnhancedInstance objInst, Method method, Object[] allArguments, Class<?>[] argumentsTypes, Object ret)
     
    void
    beforeMethod(org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.EnhancedInstance objInst, Method method, Object[] allArguments, Class<?>[] argumentsTypes, org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.MethodInterceptResult result)
    Consumer: The serialized trace context data will inject to the RpcContext.attachments for transport to provider side.
    void
    handleMethodException(org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.EnhancedInstance objInst, Method method, Object[] allArguments, Class<?>[] argumentsTypes, Throwable t)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • DubboInterceptor

      public DubboInterceptor()
  • Method Details

    • beforeMethod

      public void beforeMethod(org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.EnhancedInstance objInst, Method method, Object[] allArguments, Class<?>[] argumentsTypes, org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.MethodInterceptResult result) throws Throwable
      Consumer: The serialized trace context data will inject to the RpcContext.attachments for transport to provider side.

      Provider: The serialized trace context data will extract from RpcContext.attachments. current trace segment will ref if the serialization context data is not null.

      Specified by:
      beforeMethod in interface org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.InstanceMethodsAroundInterceptor
      Throws:
      Throwable
    • afterMethod

      public Object afterMethod(org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.EnhancedInstance objInst, Method method, Object[] allArguments, Class<?>[] argumentsTypes, Object ret) throws Throwable
      Specified by:
      afterMethod in interface org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.InstanceMethodsAroundInterceptor
      Throws:
      Throwable
    • handleMethodException

      public void handleMethodException(org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.EnhancedInstance objInst, Method method, Object[] allArguments, Class<?>[] argumentsTypes, Throwable t)
      Specified by:
      handleMethodException in interface org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.InstanceMethodsAroundInterceptor