pringcloud(十二)

背景:基于pringcloud(十一)继续

Zipkin服务链路追踪

Zipkin官网:https://zipkin.io/

参考资料:https://www.baeldung.com/tracing-services-with-zipkin

1.创建spring-cloud-zipkin工程,pom.xml文件内容

<?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>

    <groupId>com.zsx</groupId>
    <artifactId>spring-cloud-zipkin</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <packaging>jar</packaging>

    <name>spring-cloud-zipkin</name>
    <description>Spring Cloud Zipkin project</description>
    <properties>
        <!-- 目前最新版2.12.9不兼容 -->
        <zipkin.version>2.12.8</zipkin.version>
    </properties>
    <parent>
        <groupId>com.zsx</groupId>
        <artifactId>spring-cloud-customize-dependencies</artifactId>
        <version>0.0.1-SNAPSHOT</version>
        <relativePath>../spring-cloud-customize-dependencies/pom.xml</relativePath>
    </parent>

    <dependencies>
        <dependency>
            <groupId>io.zipkin.java</groupId>
            <artifactId>zipkin-server</artifactId>
            <version>${zipkin.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-starter-log4j2</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <!-- 引入zipkin-server 图形化界面 -->
        <dependency>
            <groupId>io.zipkin.java</groupId>
            <artifactId>zipkin-autoconfigure-ui</artifactId>
            <version>${zipkin.version}</version>
        </dependency>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <configuration>
                    <mainClass>com.zsx.ZipkinApplication</mainClass>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>

2. application.yml文件内容

spring:
  application:
    name: spring-cloud-zipkin
  main:
    allow-bean-definition-overriding: true
server:
  port: 8091
management:
  endpoints:
    web:
      exposure:
        include: '*'
  endpoint:
    health:
      show-details: always
  metrics:
    web:
      server:
        auto-time-requests: false
eureka:
  client:
    serviceUrl:
      defaultZone: http://localhost:8081/eureka/

3. 引导类

package com.zsx;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import zipkin2.server.internal.EnableZipkinServer;

@SpringBootApplication
@EnableEurekaClient
@EnableZipkinServer
public class ZipkinApplication {

    public static void main(String[] args) {
        SpringApplication.run(ZipkinApplication.class, args);
    }
}

4. 分别在工程启动注册中心,服务提供者、Ribbon消费者、Feign消费者等工程中添加依赖和application.yml文件中添加配置

<dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-zipkin</artifactId>
        </dependency>
spring:
  zipkin:
    base-url: http://localhost:8080

5. 再依次启动启动注册中心,服务提供者、Ribbon消费者、Feign消费者、ZipkinApplication

C:\software\jdk-11.0.3\bin\java.exe -XX:TieredStopAtLevel=1 -noverify -Dspring.output.ansi.enabled=always -Dcom.sun.management.jmxremote -Dspring.jmx.enabled=true -Dspring.liveBeansView.mbeanDomain -Dspring.application.admin.enabled=true "-javaagent:C:\software\JetBrains\IntelliJ IDEA 2019.1.3\lib\idea_rt.jar=9162:C:\software\JetBrains\IntelliJ IDEA 2019.1.3\bin" -Dfile.encoding=UTF-8 -classpath F:\IdeaProjects\spring-cloud\spring-cloud-zipkin\target\classes;D:\repository\io\zipkin\java\zipkin-server\2.12.8\zipkin-server-2.12.8.jar;D:\repository\com\linecorp\armeria\armeria-spring-boot-autoconfigure\0.83.0\armeria-spring-boot-autoconfigure-0.83.0.jar;D:\repository\com\linecorp\armeria\armeria\0.83.0\armeria-0.83.0.jar;D:\repository\io\netty\netty-codec-haproxy\4.1.36.Final\netty-codec-haproxy-4.1.36.Final.jar;D:\repository\io\netty\netty-buffer\4.1.36.Final\netty-buffer-4.1.36.Final.jar;D:\repository\io\netty\netty-codec\4.1.36.Final\netty-codec-4.1.36.Final.jar;D:\repository\io\netty\netty-codec-http2\4.1.36.Final\netty-codec-http2-4.1.36.Final.jar;D:\repository\io\netty\netty-common\4.1.36.Final\netty-common-4.1.36.Final.jar;D:\repository\io\netty\netty-handler\4.1.36.Final\netty-handler-4.1.36.Final.jar;D:\repository\io\netty\netty-codec-http\4.1.36.Final\netty-codec-http-4.1.36.Final.jar;D:\repository\io\netty\netty-resolver-dns\4.1.36.Final\netty-resolver-dns-4.1.36.Final.jar;D:\repository\io\netty\netty-resolver\4.1.36.Final\netty-resolver-4.1.36.Final.jar;D:\repository\io\netty\netty-codec-dns\4.1.36.Final\netty-codec-dns-4.1.36.Final.jar;D:\repository\io\netty\netty-tcnative-boringssl-static\2.0.25.Final\netty-tcnative-boringssl-static-2.0.25.Final.jar;D:\repository\io\netty\netty-transport\4.1.36.Final\netty-transport-4.1.36.Final.jar;D:\repository\io\netty\netty-transport-native-epoll\4.1.36.Final\netty-transport-native-epoll-4.1.36.Final-linux-x86_64.jar;D:\repository\io\netty\netty-transport-native-unix-common\4.1.36.Final\netty-transport-native-unix-common-4.1.36.Final.jar;D:\repository\org\reactivestreams\reactive-streams\1.0.2\reactive-streams-1.0.2.jar;D:\repository\com\google\code\findbugs\jsr305\3.0.2\jsr305-3.0.2.jar;D:\repository\io\dropwizard\metrics\metrics-json\4.0.5\metrics-json-4.0.5.jar;D:\repository\io\dropwizard\metrics\metrics-core\4.0.5\metrics-core-4.0.5.jar;D:\repository\io\micrometer\micrometer-registry-prometheus\1.1.5\micrometer-registry-prometheus-1.1.5.jar;D:\repository\io\prometheus\simpleclient_common\0.5.0\simpleclient_common-0.5.0.jar;D:\repository\io\prometheus\simpleclient\0.5.0\simpleclient-0.5.0.jar;D:\repository\javax\inject\javax.inject\1\javax.inject-1.jar;D:\repository\org\slf4j\slf4j-api\1.7.26\slf4j-api-1.7.26.jar;D:\repository\com\linecorp\armeria\armeria-spring-boot-actuator-starter\0.83.0\armeria-spring-boot-actuator-starter-0.83.0.jar;D:\repository\com\linecorp\armeria\armeria-spring-boot-actuator-autoconfigure\0.83.0\armeria-spring-boot-actuator-autoconfigure-0.83.0.jar;D:\repository\com\linecorp\armeria\armeria-zipkin\0.83.0\armeria-zipkin-0.83.0.jar;D:\repository\io\zipkin\brave\brave\5.6.3\brave-5.6.3.jar;D:\repository\io\zipkin\reporter2\zipkin-reporter\2.8.1\zipkin-reporter-2.8.1.jar;D:\repository\org\springframework\boot\spring-boot-starter-actuator\2.1.6.RELEASE\spring-boot-starter-actuator-2.1.6.RELEASE.jar;D:\repository\org\springframework\boot\spring-boot-actuator-autoconfigure\2.1.6.RELEASE\spring-boot-actuator-autoconfigure-2.1.6.RELEASE.jar;D:\repository\org\springframework\boot\spring-boot-actuator\2.1.6.RELEASE\spring-boot-actuator-2.1.6.RELEASE.jar;D:\repository\io\micrometer\micrometer-core\1.1.5\micrometer-core-1.1.5.jar;D:\repository\org\hdrhistogram\HdrHistogram\2.1.9\HdrHistogram-2.1.9.jar;D:\repository\org\latencyutils\LatencyUtils\2.0.3\LatencyUtils-2.0.3.jar;D:\repository\io\zipkin\zipkin2\zipkin\2.12.8\zipkin-2.12.8.jar;D:\repository\io\zipkin\zipkin2\zipkin-collector\2.12.8\zipkin-collector-2.12.8.jar;D:\repository\io\zipkin\java\zipkin-autoconfigure-metrics-prometheus\2.12.8\zipkin-autoconfigure-metrics-prometheus-2.12.8.jar;D:\repository\io\zipkin\java\zipkin-autoconfigure-ui\2.12.8\zipkin-autoconfigure-ui-2.12.8.jar;D:\repository\javax\servlet\javax.servlet-api\4.0.1\javax.servlet-api-4.0.1.jar;D:\repository\io\zipkin\java\zipkin-ui\2.12.8\zipkin-ui-2.12.8.jar;D:\repository\io\zipkin\zipkin2\zipkin-lens\2.12.8\zipkin-lens-2.12.8.jar;D:\repository\org\jsoup\jsoup\1.11.3\jsoup-1.11.3.jar;D:\repository\org\hibernate\validator\hibernate-validator\6.0.17.Final\hibernate-validator-6.0.17.Final.jar;D:\repository\javax\validation\validation-api\2.0.1.Final\validation-api-2.0.1.Final.jar;D:\repository\org\jboss\logging\jboss-logging\3.3.2.Final\jboss-logging-3.3.2.Final.jar;D:\repository\com\fasterxml\classmate\1.4.0\classmate-1.4.0.jar;D:\repository\org\springframework\boot\spring-boot-autoconfigure\2.1.6.RELEASE\spring-boot-autoconfigure-2.1.6.RELEASE.jar;D:\repository\org\springframework\boot\spring-boot\2.1.6.RELEASE\spring-boot-2.1.6.RELEASE.jar;D:\repository\org\springframework\cloud\spring-cloud-starter-netflix-eureka-client\2.1.2.RELEASE\spring-cloud-starter-netflix-eureka-client-2.1.2.RELEASE.jar;D:\repository\org\springframework\cloud\spring-cloud-starter\2.1.2.RELEASE\spring-cloud-starter-2.1.2.RELEASE.jar;D:\repository\org\springframework\cloud\spring-cloud-context\2.1.2.RELEASE\spring-cloud-context-2.1.2.RELEASE.jar;D:\repository\org\springframework\security\spring-security-crypto\5.1.5.RELEASE\spring-security-crypto-5.1.5.RELEASE.jar;D:\repository\org\springframework\cloud\spring-cloud-commons\2.1.2.RELEASE\spring-cloud-commons-2.1.2.RELEASE.jar;D:\repository\org\springframework\security\spring-security-rsa\1.0.7.RELEASE\spring-security-rsa-1.0.7.RELEASE.jar;D:\repository\org\bouncycastle\bcpkix-jdk15on\1.60\bcpkix-jdk15on-1.60.jar;D:\repository\org\bouncycastle\bcprov-jdk15on\1.60\bcprov-jdk15on-1.60.jar;D:\repository\org\springframework\cloud\spring-cloud-netflix-hystrix\2.1.2.RELEASE\spring-cloud-netflix-hystrix-2.1.2.RELEASE.jar;D:\repository\org\springframework\boot\spring-boot-starter-aop\2.1.6.RELEASE\spring-boot-starter-aop-2.1.6.RELEASE.jar;D:\repository\org\aspectj\aspectjweaver\1.9.4\aspectjweaver-1.9.4.jar;D:\repository\org\springframework\cloud\spring-cloud-netflix-eureka-client\2.1.2.RELEASE\spring-cloud-netflix-eureka-client-2.1.2.RELEASE.jar;D:\repository\com\netflix\eureka\eureka-client\1.9.12\eureka-client-1.9.12.jar;D:\repository\org\codehaus\jettison\jettison\1.3.7\jettison-1.3.7.jar;D:\repository\stax\stax-api\1.0.1\stax-api-1.0.1.jar;D:\repository\com\netflix\netflix-commons\netflix-eventbus\0.3.0\netflix-eventbus-0.3.0.jar;D:\repository\com\netflix\netflix-commons\netflix-infix\0.3.0\netflix-infix-0.3.0.jar;D:\repository\commons-jxpath\commons-jxpath\1.3\commons-jxpath-1.3.jar;D:\repository\joda-time\joda-time\2.10.2\joda-time-2.10.2.jar;D:\repository\org\antlr\antlr-runtime\3.4\antlr-runtime-3.4.jar;D:\repository\org\antlr\stringtemplate\3.2.1\stringtemplate-3.2.1.jar;D:\repository\antlr\antlr\2.7.7\antlr-2.7.7.jar;D:\repository\com\google\code\gson\gson\2.8.5\gson-2.8.5.jar;D:\repository\org\apache\commons\commons-math\2.2\commons-math-2.2.jar;D:\repository\com\netflix\archaius\archaius-core\0.7.6\archaius-core-0.7.6.jar;D:\repository\com\google\guava\guava\16.0\guava-16.0.jar;D:\repository\javax\ws\rs\jsr311-api\1.1.1\jsr311-api-1.1.1.jar;D:\repository\com\netflix\servo\servo-core\0.12.21\servo-core-0.12.21.jar;D:\repository\com\sun\jersey\jersey-core\1.19.1\jersey-core-1.19.1.jar;D:\repository\com\sun\jersey\jersey-client\1.19.1\jersey-client-1.19.1.jar;D:\repository\com\sun\jersey\contribs\jersey-apache-client4\1.19.1\jersey-apache-client4-1.19.1.jar;D:\repository\org\apache\httpcomponents\httpclient\4.5.9\httpclient-4.5.9.jar;D:\repository\org\apache\httpcomponents\httpcore\4.4.11\httpcore-4.4.11.jar;D:\repository\commons-codec\commons-codec\1.11\commons-codec-1.11.jar;D:\repository\com\google\inject\guice\4.1.0\guice-4.1.0.jar;D:\repository\aopalliance\aopalliance\1.0\aopalliance-1.0.jar;D:\repository\com\github\vlsi\compactmap\compactmap\1.2.1\compactmap-1.2.1.jar;D:\repository\com\github\andrewoma\dexx\dexx-collections\0.2\dexx-collections-0.2.jar;D:\repository\com\fasterxml\jackson\core\jackson-annotations\2.9.0\jackson-annotations-2.9.0.jar;D:\repository\com\fasterxml\jackson\core\jackson-core\2.9.9\jackson-core-2.9.9.jar;D:\repository\com\fasterxml\jackson\core\jackson-databind\2.9.9\jackson-databind-2.9.9.jar;D:\repository\com\netflix\eureka\eureka-core\1.9.12\eureka-core-1.9.12.jar;D:\repository\com\fasterxml\woodstox\woodstox-core\5.0.3\woodstox-core-5.0.3.jar;D:\repository\org\codehaus\woodstox\stax2-api\3.1.4\stax2-api-3.1.4.jar;D:\repository\org\springframework\cloud\spring-cloud-starter-netflix-archaius\2.1.2.RELEASE\spring-cloud-starter-netflix-archaius-2.1.2.RELEASE.jar;D:\repository\org\springframework\cloud\spring-cloud-netflix-ribbon\2.1.2.RELEASE\spring-cloud-netflix-ribbon-2.1.2.RELEASE.jar;D:\repository\org\springframework\cloud\spring-cloud-netflix-archaius\2.1.2.RELEASE\spring-cloud-netflix-archaius-2.1.2.RELEASE.jar;D:\repository\commons-configuration\commons-configuration\1.8\commons-configuration-1.8.jar;D:\repository\commons-lang\commons-lang\2.6\commons-lang-2.6.jar;D:\repository\org\springframework\cloud\spring-cloud-starter-netflix-ribbon\2.1.2.RELEASE\spring-cloud-starter-netflix-ribbon-2.1.2.RELEASE.jar;D:\repository\com\netflix\ribbon\ribbon\2.3.0\ribbon-2.3.0.jar;D:\repository\com\netflix\ribbon\ribbon-transport\2.3.0\ribbon-transport-2.3.0.jar;D:\repository\io\reactivex\rxnetty-contexts\0.4.9\rxnetty-contexts-0.4.9.jar;D:\repository\io\reactivex\rxnetty-servo\0.4.9\rxnetty-servo-0.4.9.jar;D:\repository\com\netflix\hystrix\hystrix-core\1.5.18\hystrix-core-1.5.18.jar;D:\repository\io\reactivex\rxnetty\0.4.9\rxnetty-0.4.9.jar;D:\repository\com\netflix\ribbon\ribbon-core\2.3.0\ribbon-core-2.3.0.jar;D:\repository\com\netflix\ribbon\ribbon-httpclient\2.3.0\ribbon-httpclient-2.3.0.jar;D:\repository\commons-collections\commons-collections\3.2.2\commons-collections-3.2.2.jar;D:\repository\com\netflix\netflix-commons\netflix-commons-util\0.3.0\netflix-commons-util-0.3.0.jar;D:\repository\com\netflix\ribbon\ribbon-loadbalancer\2.3.0\ribbon-loadbalancer-2.3.0.jar;D:\repository\com\netflix\netflix-commons\netflix-statistics\0.1.1\netflix-statistics-0.1.1.jar;D:\repository\io\reactivex\rxjava\1.3.8\rxjava-1.3.8.jar;D:\repository\com\netflix\ribbon\ribbon-eureka\2.3.0\ribbon-eureka-2.3.0.jar;D:\repository\com\thoughtworks\xstream\xstream\1.4.10\xstream-1.4.10.jar;D:\repository\xmlpull\xmlpull\1.1.3.1\xmlpull-1.1.3.1.jar;D:\repository\xpp3\xpp3_min\1.1.4c\xpp3_min-1.1.4c.jar;D:\repository\org\springframework\boot\spring-boot-starter-web\2.1.6.RELEASE\spring-boot-starter-web-2.1.6.RELEASE.jar;D:\repository\org\springframework\boot\spring-boot-starter\2.1.6.RELEASE\spring-boot-starter-2.1.6.RELEASE.jar;D:\repository\org\springframework\boot\spring-boot-starter-logging\2.1.6.RELEASE\spring-boot-starter-logging-2.1.6.RELEASE.jar;D:\repository\ch\qos\logback\logback-classic\1.2.3\logback-classic-1.2.3.jar;D:\repository\ch\qos\logback\logback-core\1.2.3\logback-core-1.2.3.jar;D:\repository\org\apache\logging\log4j\log4j-to-slf4j\2.11.2\log4j-to-slf4j-2.11.2.jar;D:\repository\org\apache\logging\log4j\log4j-api\2.11.2\log4j-api-2.11.2.jar;D:\repository\org\slf4j\jul-to-slf4j\1.7.26\jul-to-slf4j-1.7.26.jar;D:\repository\javax\annotation\javax.annotation-api\1.3.2\javax.annotation-api-1.3.2.jar;D:\repository\org\yaml\snakeyaml\1.23\snakeyaml-1.23.jar;D:\repository\org\springframework\boot\spring-boot-starter-json\2.1.6.RELEASE\spring-boot-starter-json-2.1.6.RELEASE.jar;D:\repository\com\fasterxml\jackson\datatype\jackson-datatype-jdk8\2.9.9\jackson-datatype-jdk8-2.9.9.jar;D:\repository\com\fasterxml\jackson\datatype\jackson-datatype-jsr310\2.9.9\jackson-datatype-jsr310-2.9.9.jar;D:\repository\com\fasterxml\jackson\module\jackson-module-parameter-names\2.9.9\jackson-module-parameter-names-2.9.9.jar;D:\repository\org\springframework\boot\spring-boot-starter-tomcat\2.1.6.RELEASE\spring-boot-starter-tomcat-2.1.6.RELEASE.jar;D:\repository\org\apache\tomcat\embed\tomcat-embed-core\9.0.21\tomcat-embed-core-9.0.21.jar;D:\repository\org\apache\tomcat\embed\tomcat-embed-el\9.0.21\tomcat-embed-el-9.0.21.jar;D:\repository\org\apache\tomcat\embed\tomcat-embed-websocket\9.0.21\tomcat-embed-websocket-9.0.21.jar;D:\repository\org\springframework\spring-web\5.1.8.RELEASE\spring-web-5.1.8.RELEASE.jar;D:\repository\org\springframework\spring-beans\5.1.8.RELEASE\spring-beans-5.1.8.RELEASE.jar;D:\repository\org\springframework\spring-webmvc\5.1.8.RELEASE\spring-webmvc-5.1.8.RELEASE.jar;D:\repository\org\springframework\spring-aop\5.1.8.RELEASE\spring-aop-5.1.8.RELEASE.jar;D:\repository\org\springframework\spring-context\5.1.8.RELEASE\spring-context-5.1.8.RELEASE.jar;D:\repository\org\springframework\spring-expression\5.1.8.RELEASE\spring-expression-5.1.8.RELEASE.jar;D:\repository\org\springframework\spring-core\5.1.8.RELEASE\spring-core-5.1.8.RELEASE.jar;D:\repository\org\springframework\spring-jcl\5.1.8.RELEASE\spring-jcl-5.1.8.RELEASE.jar;D:\repository\org\glassfish\jaxb\jaxb-core\2.3.0.1\jaxb-core-2.3.0.1.jar;D:\repository\javax\xml\bind\jaxb-api\2.3.1\jaxb-api-2.3.1.jar;D:\repository\javax\activation\javax.activation-api\1.2.0\javax.activation-api-1.2.0.jar;D:\repository\org\glassfish\jaxb\txw2\2.3.1\txw2-2.3.1.jar;D:\repository\com\sun\istack\istack-commons-runtime\3.0.5\istack-commons-runtime-3.0.5.jar;D:\repository\com\sun\xml\bind\jaxb-impl\2.3.2\jaxb-impl-2.3.2.jar com.zsx.ZipkinApplication
2019-08-08 14:16:29.960  INFO 13800 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration' of type [org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration$$EnhancerBySpringCGLIB$$cf0fc04d] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
                                    ********
                                  **        **
                                 *            *
                                **            **
                                **            **
                                 **          **
                                  **        **
                                    ********
                                      ****
                                      ****
        ****                          ****
     ******                           ****                                 ***
  ****************************************************************************
    *******                           ****                                 ***
        ****                          ****
                                       **
                                       **


             *****      **     *****     ** **       **     **   **
               **       **     **  *     ***         **     **** **
              **        **     *****     ****        **     **  ***
             ******     **     **        **  **      **     **   **

:: Powered by Spring Boot ::         (v2.1.6.RELEASE)

2019-08-08 14:16:30.256  INFO 13800 --- [           main] com.zsx.ZipkinApplication                : No active profile set, falling back to default profiles: default
2019-08-08 14:16:30.641  WARN 13800 --- [           main] o.s.boot.actuate.endpoint.EndpointId     : Endpoint ID 'service-registry' contains invalid characters, please migrate to a valid format.
2019-08-08 14:16:30.748  INFO 13800 --- [           main] o.s.cloud.context.scope.GenericScope     : BeanFactory id=294f08ab-6133-3943-9cb5-73d2fbdcbde5
2019-08-08 14:16:30.811  INFO 13800 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration' of type [org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration$$EnhancerBySpringCGLIB$$cf0fc04d] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-08-08 14:16:30.942  INFO 13800 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port(s): 8091 (http)
2019-08-08 14:16:30.957  INFO 13800 --- [           main] o.apache.catalina.core.StandardService   : Starting service [Tomcat]
2019-08-08 14:16:30.957  INFO 13800 --- [           main] org.apache.catalina.core.StandardEngine  : Starting Servlet engine: [Apache Tomcat/9.0.21]
2019-08-08 14:16:31.042  INFO 13800 --- [           main] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
2019-08-08 14:16:31.042  INFO 13800 --- [           main] o.s.web.context.ContextLoader            : Root WebApplicationContext: initialization completed in 776 ms
2019-08-08 14:16:31.252  WARN 13800 --- [           main] c.n.c.sources.URLConfigurationSource     : No URLs will be polled as dynamic configuration sources.
2019-08-08 14:16:31.252  INFO 13800 --- [           main] c.n.c.sources.URLConfigurationSource     : To enable URLs as dynamic configuration sources, define System property archaius.configurationSource.additionalUrls or make config.properties available on classpath.
2019-08-08 14:16:31.256  INFO 13800 --- [           main] c.netflix.config.DynamicPropertyFactory  : DynamicPropertyFactory is initialized with configuration sources: com.netflix.config.ConcurrentCompositeConfiguration@2d130ac4
2019-08-08 14:16:31.430  WARN 13800 --- [           main] c.n.c.sources.URLConfigurationSource     : No URLs will be polled as dynamic configuration sources.
2019-08-08 14:16:31.430  INFO 13800 --- [           main] c.n.c.sources.URLConfigurationSource     : To enable URLs as dynamic configuration sources, define System property archaius.configurationSource.additionalUrls or make config.properties available on classpath.
2019-08-08 14:16:31.498  INFO 13800 --- [           main] o.s.s.concurrent.ThreadPoolTaskExecutor  : Initializing ExecutorService 'applicationTaskExecutor'
2019-08-08 14:16:31.628  INFO 13800 --- [           main] com.linecorp.armeria.common.Flags        : com.linecorp.armeria.verboseExceptions: false (default)
2019-08-08 14:16:31.628  INFO 13800 --- [           main] com.linecorp.armeria.common.Flags        : com.linecorp.armeria.verboseSocketExceptions: false (default)
2019-08-08 14:16:31.628  INFO 13800 --- [           main] com.linecorp.armeria.common.Flags        : com.linecorp.armeria.verboseResponses: false (default)
2019-08-08 14:16:31.629  INFO 13800 --- [           main] com.linecorp.armeria.common.Flags        : com.linecorp.armeria.useEpoll: false (default)
2019-08-08 14:16:31.697  INFO 13800 --- [           main] com.linecorp.armeria.common.Flags        : com.linecorp.armeria.useOpenSsl: true (default)
2019-08-08 14:16:31.698  INFO 13800 --- [           main] com.linecorp.armeria.common.Flags        : com.linecorp.armeria.maxNumConnections: 2147483647 (default)
2019-08-08 14:16:31.698  INFO 13800 --- [           main] com.linecorp.armeria.common.Flags        : com.linecorp.armeria.numCommonWorkers: 16 (default)
2019-08-08 14:16:31.698  INFO 13800 --- [           main] com.linecorp.armeria.common.Flags        : com.linecorp.armeria.numCommonBlockingTaskThreads: 200 (default)
2019-08-08 14:16:31.698  INFO 13800 --- [           main] com.linecorp.armeria.common.Flags        : com.linecorp.armeria.defaultMaxRequestLength: 10485760 (default)
2019-08-08 14:16:31.698  INFO 13800 --- [           main] com.linecorp.armeria.common.Flags        : com.linecorp.armeria.defaultMaxResponseLength: 10485760 (default)
2019-08-08 14:16:31.698  INFO 13800 --- [           main] com.linecorp.armeria.common.Flags        : com.linecorp.armeria.defaultRequestTimeoutMillis: 10000 (default)
2019-08-08 14:16:31.699  INFO 13800 --- [           main] com.linecorp.armeria.common.Flags        : com.linecorp.armeria.defaultResponseTimeoutMillis: 15000 (default)
2019-08-08 14:16:31.699  INFO 13800 --- [           main] com.linecorp.armeria.common.Flags        : com.linecorp.armeria.defaultConnectTimeoutMillis: 3200 (default)
2019-08-08 14:16:31.699  INFO 13800 --- [           main] com.linecorp.armeria.common.Flags        : com.linecorp.armeria.defaultServerIdleTimeoutMillis: 15000 (default)
2019-08-08 14:16:31.699  INFO 13800 --- [           main] com.linecorp.armeria.common.Flags        : com.linecorp.armeria.defaultClientIdleTimeoutMillis: 10000 (default)
2019-08-08 14:16:31.699  INFO 13800 --- [           main] com.linecorp.armeria.common.Flags        : com.linecorp.armeria.defaultHttp2InitialConnectionWindowSize: 1048576 (default)
2019-08-08 14:16:31.699  INFO 13800 --- [           main] com.linecorp.armeria.common.Flags        : com.linecorp.armeria.defaultHttp2InitialStreamWindowSize: 1048576 (default)
2019-08-08 14:16:31.699  INFO 13800 --- [           main] com.linecorp.armeria.common.Flags        : com.linecorp.armeria.defaultHttp2MaxFrameSize: 16384 (default)
2019-08-08 14:16:31.699  INFO 13800 --- [           main] com.linecorp.armeria.common.Flags        : com.linecorp.armeria.defaultHttp2MaxStreamsPerConnection: 2147483647 (default)
2019-08-08 14:16:31.699  INFO 13800 --- [           main] com.linecorp.armeria.common.Flags        : com.linecorp.armeria.defaultHttp2MaxHeaderListSize: 8192 (default)
2019-08-08 14:16:31.699  INFO 13800 --- [           main] com.linecorp.armeria.common.Flags        : com.linecorp.armeria.defaultHttp1MaxInitialLineLength: 4096 (default)
2019-08-08 14:16:31.700  INFO 13800 --- [           main] com.linecorp.armeria.common.Flags        : com.linecorp.armeria.defaultHttp1MaxHeaderSize: 8192 (default)
2019-08-08 14:16:31.700  INFO 13800 --- [           main] com.linecorp.armeria.common.Flags        : com.linecorp.armeria.defaultHttp1MaxChunkSize: 8192 (default)
2019-08-08 14:16:31.700  INFO 13800 --- [           main] com.linecorp.armeria.common.Flags        : com.linecorp.armeria.defaultUseHttp2Preface: true (default)
2019-08-08 14:16:31.700  INFO 13800 --- [           main] com.linecorp.armeria.common.Flags        : com.linecorp.armeria.defaultUseHttp1Pipelining: false (default)
2019-08-08 14:16:31.700  INFO 13800 --- [           main] com.linecorp.armeria.common.Flags        : com.linecorp.armeria.defaultBackoffSpec: exponential=200:10000,jitter=0.2 (default)
2019-08-08 14:16:31.700  INFO 13800 --- [           main] com.linecorp.armeria.common.Flags        : com.linecorp.armeria.defaultMaxTotalAttempts: 10 (default)
2019-08-08 14:16:31.700  INFO 13800 --- [           main] com.linecorp.armeria.common.Flags        : com.linecorp.armeria.routeCache: maximumSize=4096 (default)
2019-08-08 14:16:31.700  INFO 13800 --- [           main] com.linecorp.armeria.common.Flags        : com.linecorp.armeria.compositeServiceCache: maximumSize=256 (default)
2019-08-08 14:16:31.700  INFO 13800 --- [           main] com.linecorp.armeria.common.Flags        : com.linecorp.armeria.parsedPathCache: maximumSize=4096 (default)
2019-08-08 14:16:31.700  INFO 13800 --- [           main] com.linecorp.armeria.common.Flags        : com.linecorp.armeria.headerValueCache: maximumSize=4096 (default)
2019-08-08 14:16:31.701  INFO 13800 --- [           main] com.linecorp.armeria.common.Flags        : com.linecorp.armeria.cachedHeaders: :authority,:scheme,:method,accept-encoding,content-type (default)
2019-08-08 14:16:31.701  INFO 13800 --- [           main] com.linecorp.armeria.common.Flags        : com.linecorp.armeria.annotatedServiceExceptionVerbosity: unhandled (default)
2019-08-08 14:16:31.702  INFO 13800 --- [           main] com.linecorp.armeria.common.Flags        : /dev/epoll not available: java.lang.IllegalStateException: Only supported on Linux
2019-08-08 14:16:31.702  INFO 13800 --- [           main] com.linecorp.armeria.common.Flags        : Using OpenSSL: BoringSSL, 0x1010007f
2019-08-08 14:16:31.798  INFO 13800 --- [           main] c.l.armeria.common.util.SystemInfo       : Hostname: zsx (from 'hostname' command)
2019-08-08 14:16:32.031  INFO 13800 --- [oss-http-*:8080] com.linecorp.armeria.server.Server       : Serving HTTP at /0:0:0:0:0:0:0:0:8080 - http://127.0.0.1:8080/
2019-08-08 14:16:32.032  INFO 13800 --- [           main] c.l.a.spring.ArmeriaAutoConfiguration    : Armeria server started at ports: {/0:0:0:0:0:0:0:0:8080=ServerPort(/0:0:0:0:0:0:0:0:8080, [http])}
2019-08-08 14:16:32.185  INFO 13800 --- [           main] o.s.b.a.e.web.EndpointLinksResolver      : Exposing 20 endpoint(s) beneath base path '/actuator'
2019-08-08 14:16:32.233  INFO 13800 --- [           main] o.s.c.n.eureka.InstanceInfoFactory       : Setting initial instance status as: STARTING
2019-08-08 14:16:32.250  INFO 13800 --- [           main] com.netflix.discovery.DiscoveryClient    : Initializing Eureka in region us-east-1
2019-08-08 14:16:32.321  INFO 13800 --- [           main] c.n.d.provider.DiscoveryJerseyProvider   : Using JSON encoding codec LegacyJacksonJson
2019-08-08 14:16:32.321  INFO 13800 --- [           main] c.n.d.provider.DiscoveryJerseyProvider   : Using JSON decoding codec LegacyJacksonJson
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.thoughtworks.xstream.core.util.Fields (file:/D:/repository/com/thoughtworks/xstream/xstream/1.4.10/xstream-1.4.10.jar) to field java.util.TreeMap.comparator
WARNING: Please consider reporting this to the maintainers of com.thoughtworks.xstream.core.util.Fields
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
2019-08-08 14:16:32.385  INFO 13800 --- [           main] c.n.d.provider.DiscoveryJerseyProvider   : Using XML encoding codec XStreamXml
2019-08-08 14:16:32.385  INFO 13800 --- [           main] c.n.d.provider.DiscoveryJerseyProvider   : Using XML decoding codec XStreamXml
2019-08-08 14:16:32.496  INFO 13800 --- [           main] c.n.d.s.r.aws.ConfigClusterResolver      : Resolving eureka endpoints via configuration
2019-08-08 14:16:32.528  INFO 13800 --- [           main] com.netflix.discovery.DiscoveryClient    : Disable delta property : false
2019-08-08 14:16:32.529  INFO 13800 --- [           main] com.netflix.discovery.DiscoveryClient    : Single vip registry refresh property : null
2019-08-08 14:16:32.529  INFO 13800 --- [           main] com.netflix.discovery.DiscoveryClient    : Force full registry fetch : false
2019-08-08 14:16:32.529  INFO 13800 --- [           main] com.netflix.discovery.DiscoveryClient    : Application is null : false
2019-08-08 14:16:32.529  INFO 13800 --- [           main] com.netflix.discovery.DiscoveryClient    : Registered Applications size is zero : true
2019-08-08 14:16:32.529  INFO 13800 --- [           main] com.netflix.discovery.DiscoveryClient    : Application version is -1: true
2019-08-08 14:16:32.529  INFO 13800 --- [           main] com.netflix.discovery.DiscoveryClient    : Getting all instance registry info from the eureka server
2019-08-08 14:16:32.594  INFO 13800 --- [           main] com.netflix.discovery.DiscoveryClient    : The response status is 200
2019-08-08 14:16:32.595  INFO 13800 --- [           main] com.netflix.discovery.DiscoveryClient    : Starting heartbeat executor: renew interval is: 30
2019-08-08 14:16:32.596  INFO 13800 --- [           main] c.n.discovery.InstanceInfoReplicator     : InstanceInfoReplicator onDemand update allowed rate per min is 4
2019-08-08 14:16:32.598  INFO 13800 --- [           main] com.netflix.discovery.DiscoveryClient    : Discovery Client initialized at timestamp 1565244992597 with initial instances count: 6
2019-08-08 14:16:32.599  INFO 13800 --- [           main] o.s.c.n.e.s.EurekaServiceRegistry        : Registering application SPRING-CLOUD-ZIPKIN with eureka with status UP
2019-08-08 14:16:32.599  INFO 13800 --- [           main] com.netflix.discovery.DiscoveryClient    : Saw local status change event StatusChangeEvent [timestamp=1565244992599, current=UP, previous=STARTING]
2019-08-08 14:16:32.600  INFO 13800 --- [nfoReplicator-0] com.netflix.discovery.DiscoveryClient    : DiscoveryClient_SPRING-CLOUD-ZIPKIN/172.20.202.43:spring-cloud-zipkin:8091: registering service...
2019-08-08 14:16:32.610  INFO 13800 --- [nfoReplicator-0] com.netflix.discovery.DiscoveryClient    : DiscoveryClient_SPRING-CLOUD-ZIPKIN/172.20.202.43:spring-cloud-zipkin:8091 - registration status: 204
2019-08-08 14:16:32.617  INFO 13800 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat started on port(s): 8091 (http) with context path ''
2019-08-08 14:16:32.618  INFO 13800 --- [           main] .s.c.n.e.s.EurekaAutoServiceRegistration : Updating port to 8091
2019-08-08 14:16:32.619  INFO 13800 --- [           main] com.zsx.ZipkinApplication                : Started ZipkinApplication in 3.359 seconds (JVM running for 3.817)
2019-08-08 14:16:32.836  INFO 13800 --- [2)-192.168.56.1] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring DispatcherServlet 'dispatcherServlet'
2019-08-08 14:16:32.837  INFO 13800 --- [2)-192.168.56.1] o.s.web.servlet.DispatcherServlet        : Initializing Servlet 'dispatcherServlet'
2019-08-08 14:16:32.845  INFO 13800 --- [2)-192.168.56.1] o.s.web.servlet.DispatcherServlet        : Completed initialization in 8 ms

6. 查看请求http://127.0.0.1:8080/zipkin/

7. 查询服务

8. 查看服务信息

9. 查看请求http://localhost:8085/feign/hello后,再查看依赖

到此Zipkin配置完成

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值