public class DubboInterceptor extends Object implements 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.| Constructor and Description |
|---|
DubboInterceptor() |
| Modifier and Type | Method and Description |
|---|---|
Object |
afterMethod(EnhancedInstance objInst,
Method method,
Object[] allArguments,
Class<?>[] argumentsTypes,
Object ret) |
void |
beforeMethod(EnhancedInstance objInst,
Method method,
Object[] allArguments,
Class<?>[] argumentsTypes,
MethodInterceptResult result)
Consumer:
|
void |
handleMethodException(EnhancedInstance objInst,
Method method,
Object[] allArguments,
Class<?>[] argumentsTypes,
Throwable t) |
public void beforeMethod(EnhancedInstance objInst, Method method, Object[] allArguments, Class<?>[] argumentsTypes, MethodInterceptResult result) throws Throwable
RpcContext.attachments for transport to provider side.
RpcContext.attachments. current trace segment will ref if the serialize context data is not null.beforeMethod in interface InstanceMethodsAroundInterceptorThrowablepublic Object afterMethod(EnhancedInstance objInst, Method method, Object[] allArguments, Class<?>[] argumentsTypes, Object ret) throws Throwable
afterMethod in interface InstanceMethodsAroundInterceptorThrowablepublic void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments, Class<?>[] argumentsTypes, Throwable t)
handleMethodException in interface InstanceMethodsAroundInterceptorCopyright © 2020 The Apache Software Foundation. All rights reserved.