fix api compile issue. remove rmi-oracle plugin.
This commit is contained in:
parent
2a979c0222
commit
106dc93fe8
|
|
@ -33,7 +33,7 @@ public enum TraceSegmentProcessQueue implements TracerContextListener {
|
|||
};
|
||||
|
||||
private Disruptor<TraceSegmentHolder> disruptor;
|
||||
private RingBuffer<TraceSegmentHolder> buffer;
|
||||
RingBuffer<TraceSegmentHolder> buffer;
|
||||
|
||||
TraceSegmentProcessQueue() {
|
||||
disruptor = new Disruptor<>(TraceSegmentHolder.Factory.INSTANCE, Config.Disruptor.BUFFER_SIZE, DaemonThreadFactory.INSTANCE);
|
||||
|
|
|
|||
|
|
@ -1,15 +0,0 @@
|
|||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>skywalking-sdk-plugin</artifactId>
|
||||
<groupId>com.a.eye</groupId>
|
||||
<version>3.0-2017</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>rmi-oracle-1.8-plugin</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>rmi-oracle-1.8-plugin</name>
|
||||
<url>http://maven.apache.org</url>
|
||||
</project>
|
||||
|
|
@ -1,25 +0,0 @@
|
|||
package com.a.eye.skywalking.plugin.rmi.oracle18;
|
||||
|
||||
import com.a.eye.skywalking.api.IBuriedPointType;
|
||||
|
||||
/**
|
||||
* Created by xin on 2016/12/22.
|
||||
*/
|
||||
public class RMIBuriedPointType implements IBuriedPointType{
|
||||
|
||||
public static RMIBuriedPointType INSTANCE = new RMIBuriedPointType();
|
||||
|
||||
private RMIBuriedPointType(){
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTypeName() {
|
||||
return "R";
|
||||
}
|
||||
|
||||
@Override
|
||||
public CallType getCallType() {
|
||||
return CallType.SYNC;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,42 +0,0 @@
|
|||
package com.a.eye.skywalking.plugin.rmi.oracle18;
|
||||
|
||||
import com.a.eye.skywalking.invoke.monitor.RPCClientInvokeMonitor;
|
||||
import com.a.eye.skywalking.model.ContextData;
|
||||
import com.a.eye.skywalking.model.Identification;
|
||||
import com.a.eye.skywalking.plugin.interceptor.EnhancedClassInstanceContext;
|
||||
import com.a.eye.skywalking.plugin.interceptor.enhance.InstanceMethodInvokeContext;
|
||||
import com.a.eye.skywalking.plugin.interceptor.enhance.InstanceMethodsAroundInterceptor;
|
||||
import com.a.eye.skywalking.plugin.interceptor.enhance.MethodInterceptResult;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.Arrays;
|
||||
|
||||
/**
|
||||
* Created by xin on 2016/12/22.
|
||||
*/
|
||||
public class RMIClientInterceptor implements InstanceMethodsAroundInterceptor {
|
||||
@Override
|
||||
public void beforeMethod(EnhancedClassInstanceContext context, InstanceMethodInvokeContext interceptorContext, MethodInterceptResult result) {
|
||||
Object[] arguments = (Object[]) interceptorContext.allArguments()[3];
|
||||
ContextData contextData = new RPCClientInvokeMonitor()
|
||||
.beforeInvoke(Identification.newBuilder().viewPoint(((Method) interceptorContext.
|
||||
allArguments()[2]).getName()).spanType(RMIBuriedPointType.INSTANCE).build());
|
||||
String contextDataStr = contextData.toString();
|
||||
|
||||
Object[] newArguments = Arrays.copyOf(arguments, arguments.length + 1);
|
||||
newArguments[arguments.length] = contextDataStr;
|
||||
|
||||
interceptorContext.allArguments()[3] = newArguments;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object afterMethod(EnhancedClassInstanceContext context, InstanceMethodInvokeContext interceptorContext, Object ret) {
|
||||
new RPCClientInvokeMonitor().afterInvoke();
|
||||
return ret;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handleMethodException(Throwable t, EnhancedClassInstanceContext context, InstanceMethodInvokeContext interceptorContext) {
|
||||
new RPCClientInvokeMonitor().occurException(t);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,42 +0,0 @@
|
|||
package com.a.eye.skywalking.plugin.rmi.oracle18.define;
|
||||
|
||||
import com.a.eye.skywalking.plugin.interceptor.ConstructorInterceptPoint;
|
||||
import com.a.eye.skywalking.plugin.interceptor.InstanceMethodsInterceptPoint;
|
||||
import com.a.eye.skywalking.plugin.interceptor.MethodMatcher;
|
||||
import com.a.eye.skywalking.plugin.interceptor.enhance.ClassInstanceMethodsEnhancePluginDefine;
|
||||
import com.a.eye.skywalking.plugin.interceptor.matcher.SimpleMethodMatcher;
|
||||
|
||||
/**
|
||||
* Created by xin on 2016/12/22.
|
||||
*/
|
||||
public class RMIClientDefine extends ClassInstanceMethodsEnhancePluginDefine {
|
||||
|
||||
@Override
|
||||
protected String enhanceClassName() {
|
||||
return "java.rmi.serve.RemoteObjectInvocationHandler";
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ConstructorInterceptPoint[] getConstructorsInterceptPoints() {
|
||||
return new ConstructorInterceptPoint[0];
|
||||
}
|
||||
|
||||
@Override
|
||||
protected InstanceMethodsInterceptPoint[] getInstanceMethodsInterceptPoints() {
|
||||
return new InstanceMethodsInterceptPoint[]{
|
||||
new InstanceMethodsInterceptPoint() {
|
||||
@Override
|
||||
public MethodMatcher[] getMethodsMatchers() {
|
||||
return new MethodMatcher[]{
|
||||
new SimpleMethodMatcher("invokeRemoteMethod")
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMethodsInterceptor() {
|
||||
return "com.a.eye.skywalking.plugin.rmi.oracle18.RMIClientInterceptor";
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
@ -1 +0,0 @@
|
|||
com.a.eye.skywalking.plugin.rmi.oracle18.define.RMIClientDefine
|
||||
Loading…
Reference in New Issue