Fix some compile issues. Add protobuf dependency, and protoc-grpc-plugin.
This commit is contained in:
parent
f61008badc
commit
eb33354333
12
pom.xml
12
pom.xml
|
|
@ -155,16 +155,4 @@
|
|||
</plugins>
|
||||
</build>
|
||||
|
||||
<repositories>
|
||||
<repository>
|
||||
<snapshots>
|
||||
<enabled>false</enabled>
|
||||
</snapshots>
|
||||
<id>bintray</id>
|
||||
<name>bintray</name>
|
||||
<url>https://jcenter.bintray.com</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
|
||||
|
||||
</project>
|
||||
|
|
|
|||
|
|
@ -17,5 +17,63 @@
|
|||
<artifactId>skywalking-logging-api</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.google.protobuf</groupId>
|
||||
<artifactId>protobuf-java</artifactId>
|
||||
<version>3.0.0</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<extensions>
|
||||
<extension>
|
||||
<groupId>kr.motd.maven</groupId>
|
||||
<artifactId>os-maven-plugin</artifactId>
|
||||
<version>1.5.0.Final</version>
|
||||
</extension>
|
||||
</extensions>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>build-helper-maven-plugin</artifactId>
|
||||
<version>3.0.0</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>add-source</id>
|
||||
<phase>generate-sources</phase>
|
||||
<goals>
|
||||
<goal>add-source</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<sources>
|
||||
<source>src/java/generated-source/protobuf/java</source>
|
||||
</sources>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.xolstice.maven.plugins</groupId>
|
||||
<artifactId>protobuf-maven-plugin</artifactId>
|
||||
<version>0.5.0</version>
|
||||
<configuration>
|
||||
<protocArtifact>com.google.protobuf:protoc:3.0.0:exe:${os.detected.classifier}
|
||||
</protocArtifact>
|
||||
<pluginId>grpc-java</pluginId>
|
||||
<pluginArtifact>io.grpc:protoc-gen-grpc-java:1.0.2:exe:${os.detected.classifier}
|
||||
</pluginArtifact>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>compile</goal>
|
||||
<goal>compile-custom</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,9 @@
|
|||
syntax = "proto3";
|
||||
|
||||
option java_multiple_files = true;
|
||||
option java_package = "com.a.eye.skywalking.trace.proto.message";
|
||||
|
||||
|
||||
message SegmentMessage{
|
||||
|
||||
}
|
||||
|
|
@ -1,9 +1,8 @@
|
|||
package com.a.eye.skywalking.toolkit.activation.log.log4j.v1.x;
|
||||
|
||||
import com.a.eye.skywalking.plugin.interceptor.ConstructorInterceptPoint;
|
||||
import com.a.eye.skywalking.api.plugin.interceptor.ConstructorInterceptPoint;
|
||||
import com.a.eye.skywalking.api.plugin.interceptor.InstanceMethodsInterceptPoint;
|
||||
import com.a.eye.skywalking.plugin.interceptor.StaticMethodsInterceptPoint;
|
||||
import com.a.eye.skywalking.plugin.interceptor.enhance.ClassInstanceMethodsEnhancePluginDefine;
|
||||
import com.a.eye.skywalking.api.plugin.interceptor.enhance.ClassInstanceMethodsEnhancePluginDefine;
|
||||
import net.bytebuddy.description.method.MethodDescription;
|
||||
import net.bytebuddy.matcher.ElementMatcher;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
package com.a.eye.skywalking.toolkit.activation.trace;
|
||||
|
||||
import com.a.eye.skywalking.plugin.interceptor.StaticMethodsInterceptPoint;
|
||||
import com.a.eye.skywalking.plugin.interceptor.enhance.ClassStaticMethodsEnhancePluginDefine;
|
||||
import com.a.eye.skywalking.api.plugin.interceptor.StaticMethodsInterceptPoint;
|
||||
import com.a.eye.skywalking.api.plugin.interceptor.enhance.ClassStaticMethodsEnhancePluginDefine;
|
||||
import net.bytebuddy.description.method.MethodDescription;
|
||||
import net.bytebuddy.matcher.ElementMatcher;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,15 +1,15 @@
|
|||
package com.a.eye.skywalking.toolkit.activation.trace;
|
||||
|
||||
import com.a.eye.skywalking.api.Tracing;
|
||||
import com.a.eye.skywalking.api.context.ContextCarrier;
|
||||
import com.a.eye.skywalking.api.context.ContextManager;
|
||||
import com.a.eye.skywalking.api.logging.api.ILog;
|
||||
import com.a.eye.skywalking.api.logging.api.LogManager;
|
||||
import com.a.eye.skywalking.api.plugin.interceptor.enhance.MethodInterceptResult;
|
||||
import com.a.eye.skywalking.plugin.interceptor.enhance.MethodInvokeContext;
|
||||
import com.a.eye.skywalking.api.plugin.interceptor.enhance.MethodInvokeContext;
|
||||
import com.a.eye.skywalking.api.plugin.interceptor.enhance.StaticMethodInvokeContext;
|
||||
import com.a.eye.skywalking.api.plugin.interceptor.enhance.StaticMethodsAroundInterceptor;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* Created by xin on 2016/12/15.
|
||||
*/
|
||||
|
|
@ -24,7 +24,9 @@ public class TraceContextInterceptor implements StaticMethodsAroundInterceptor {
|
|||
|
||||
@Override
|
||||
public Object afterMethod(StaticMethodInvokeContext interceptorContext, Object ret) {
|
||||
return Tracing.getTraceId();
|
||||
ContextCarrier carrier = new ContextCarrier();
|
||||
ContextManager.INSTANCE.inject(carrier);
|
||||
return carrier.getTraceSegmentId();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
Loading…
Reference in New Issue