use of com.netflix.hystrix.HystrixObservableCollapser in project incubator-skywalking by apache.
the class HystrixCommandConstructorInterceptor method onConstruct.
@Override
public void onConstruct(EnhancedInstance objInst, Object[] allArguments) {
String commandIdentify = "";
if (HystrixCommand.class.isAssignableFrom(objInst.getClass())) {
HystrixCommand hystrixCommand = (HystrixCommand) objInst;
commandIdentify = hystrixCommand.getCommandKey().name();
} else if (HystrixCollapser.class.isAssignableFrom(objInst.getClass())) {
HystrixCollapser hystrixCollapser = (HystrixCollapser) objInst;
commandIdentify = hystrixCollapser.getCollapserKey().name();
} else if (HystrixObservableCollapser.class.isAssignableFrom(objInst.getClass())) {
HystrixObservableCollapser hystrixObservableCollapser = (HystrixObservableCollapser) objInst;
commandIdentify = hystrixObservableCollapser.getCollapserKey().name();
} else if (HystrixObservableCommand.class.isAssignableFrom(objInst.getClass())) {
HystrixObservableCommand hystrixObservableCommand = (HystrixObservableCommand) objInst;
commandIdentify = hystrixObservableCommand.getCommandKey().name();
}
objInst.setSkyWalkingDynamicField(new EnhanceRequireObjectCache(OPERATION_NAME_PREFIX + commandIdentify));
}
Aggregations