提交 65456716 编写于 作者: A ascrutae

add comment

上级 c58c9ec4
......@@ -20,6 +20,12 @@ package org.apache.skywalking.apm.plugin.hystrix.v1;
import org.apache.skywalking.apm.agent.core.context.ContextSnapshot;
/**
* {@link EnhanceRequireObjectCache} record the prefix operation name of span and {@link ContextSnapshot} object for
* tracing.
*
* @author zhang xin
*/
public class EnhanceRequireObjectCache {
private final String operationNamePrefix;
private ContextSnapshot contextSnapshot;
......
......@@ -25,6 +25,13 @@ import com.netflix.hystrix.HystrixObservableCommand;
import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.EnhancedInstance;
import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.InstanceConstructorInterceptor;
/**
* {@link HystrixCommandConstructorInterceptor} get <code>CommandKey</code> or <code>CollapserKey</code> as the
* operation name prefix of span when the constructor that the class hierarchy <code>com.netflix.hystrix.HystrixCommand</code>
* invoked.
*
* @author zhang xin
*/
public class HystrixCommandConstructorInterceptor implements InstanceConstructorInterceptor {
@Override
......
......@@ -18,17 +18,23 @@
package org.apache.skywalking.apm.plugin.hystrix.v1;
import com.netflix.hystrix.strategy.HystrixPlugins;
import com.netflix.hystrix.strategy.executionhook.HystrixCommandExecutionHook;
import java.lang.reflect.Method;
import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.EnhancedInstance;
import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.InstanceMethodsAroundInterceptor;
import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.MethodInterceptResult;
/**
* {@link HystrixPluginsInterceptor} wrapper the {@link HystrixCommandExecutionHook} object by using {@link
* SWExecutionHookWrapper} when the {@link HystrixPlugins#getCommandExecutionHook()} method invoked.
*
* @author zhang xin
*/
public class HystrixPluginsInterceptor implements InstanceMethodsAroundInterceptor {
@Override
public void beforeMethod(EnhancedInstance objInst, Method method, Object[] allArguments, Class<?>[] argumentsTypes,
MethodInterceptResult result) throws Throwable {
}
@Override
......
......@@ -26,6 +26,11 @@ import org.apache.skywalking.apm.agent.core.context.trace.AbstractSpan;
import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.EnhancedInstance;
import org.apache.skywalking.apm.network.trace.component.ComponentsDefine;
/**
* {@link SWExecutionHookWrapper} wrapper the HystrixCommandExecutionHook object for tracing.
*
* @author zhang xin
*/
public class SWExecutionHookWrapper extends HystrixCommandExecutionHook {
private final HystrixCommandExecutionHook actual;
......
......@@ -28,6 +28,13 @@ import org.apache.skywalking.apm.agent.core.plugin.match.ClassMatch;
import static net.bytebuddy.matcher.ElementMatchers.any;
import static org.apache.skywalking.apm.agent.core.plugin.match.HierarchyMatch.byHierarchyMatch;
/**
* {@link HystrixCommandInstrumentation} represent that the hystrix plugin intercept the constructor in the class that
* hierarchy {@link com.netflix.hystrix.HystrixCommand} class by using the {@link org.apache.skywalking.apm.plugin.hystrix.v1.HystrixCommandConstructorInterceptor}
* class.
*
* @author zhangxin
*/
public class HystrixCommandInstrumentation extends ClassInstanceMethodsEnhancePluginDefine {
public static final String INTERCEPT_CLASS = "org.apache.skywalking.apm.plugin.hystrix.v1.HystrixCommandConstructorInterceptor";
......
......@@ -28,6 +28,13 @@ import org.apache.skywalking.apm.agent.core.plugin.match.ClassMatch;
import static net.bytebuddy.matcher.ElementMatchers.named;
import static org.apache.skywalking.apm.agent.core.plugin.match.NameMatch.byName;
/**
* {@link HystrixPluginsInstrumentation} represent that the hystrix plugin intercept the
* <code>getCommandExecutionHook</code> method in the {@link com.netflix.hystrix.strategy.HystrixPlugins} class class by
* using the {@link org.apache.skywalking.apm.plugin.hystrix.v1.HystrixCommandConstructorInterceptor} class.
*
* @author zhangxin
*/
public class HystrixPluginsInstrumentation extends ClassInstanceMethodsEnhancePluginDefine {
public static final String INTERCEPT_CLASS = "org.apache.skywalking.apm.plugin.hystrix.v1.HystrixPluginsInterceptor";
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册