Commit e685ef90 authored by ascrutae's avatar ascrutae
Browse files

support netflix fegin plugin

parent ab677f20
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -95,6 +95,11 @@
            <artifactId>apm-springmvc-annotation-4.x-plugin</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.skywalking</groupId>
            <artifactId>apm-spring-cloud-feign-1.x-plugin</artifactId>
            <version>${project.version}</version>
        </dependency>

        <!-- activation -->
        <dependency>
+7 −5
Original line number Diff line number Diff line
@@ -85,6 +85,7 @@ public class DefaultHttpClientInterceptor implements InstanceMethodsAroundInterc
    @Override public Object afterMethod(EnhancedInstance objInst, Method method, Object[] allArguments,
        Class<?>[] argumentsTypes, Object ret) throws Throwable {
        Response response = (Response)ret;
        if (response != null) {
            int statusCode = response.status();

            AbstractSpan span = ContextManager.activeSpan();
@@ -92,6 +93,7 @@ public class DefaultHttpClientInterceptor implements InstanceMethodsAroundInterc
                span.errorOccurred();
                Tags.STATUS_CODE.set(span, statusCode + "");
            }
        }

        ContextManager.stopSpan();

+1 −0
Original line number Diff line number Diff line
@@ -14,6 +14,7 @@
        <module>concurrent-util-4.x-plugin</module>
        <module>resttemplate-4.x-plugin</module>
        <module>mvc-annotation-4.x-plugin</module>
        <module>spring-cloud</module>
    </modules>
    <packaging>pom</packaging>

+25 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="UTF-8"?>
<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">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>org.skywalking</groupId>
        <artifactId>spring-cloud</artifactId>
        <version>3.2-2017</version>
    </parent>

    <artifactId>netflix-plugins</artifactId>
    <modules>
        <module>spring-cloud-feign-1.x-plugin</module>
    </modules>
    <packaging>pom</packaging>

    <name>netflix-plugins</name>
    <url>http://maven.apache.org</url>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>
    
</project>
+34 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="UTF-8"?>
<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">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>org.skywalking</groupId>
        <artifactId>netflix-plugins</artifactId>
        <version>3.2-2017</version>
    </parent>

    <artifactId>apm-spring-cloud-feign-1.x-plugin</artifactId>
    <packaging>jar</packaging>

    <!-- only support spring cloud feign 1.1.x, 1.2.x, 1.3.x -->
    <name>spring-cloud-feign-1.x-plugin</name>
    <url>http://maven.apache.org</url>

    <dependencies>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-feign</artifactId>
            <version>1.1.0.RELEASE</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.skywalking</groupId>
            <artifactId>apm-feign-default-http-9.x-plugin</artifactId>
            <version>${project.version}</version>
            <scope>provided</scope>
        </dependency>
    </dependencies>

</project>
Loading