【问题标题】:Spring boot 2 fail to enable zipkin/sleuth with default configurationSpring boot 2 无法使用默认配置启用 zipkin/sleuth
【发布时间】:2019-05-08 02:33:11
【问题描述】:

具有以下配置的 Spring Boot 应用程序:

spring:
  application:
    name: 'active-listener'
  profiles: 'dev'
  sleuth:
    async:
      enabled: false
    annotation:
      enabled: true
  enabled: true
  sampler:
    probability: 1.0
  zipkin:
    baseUrl: http://localhost:9411
    enabled: true

必需的 zipkin 跟踪功能。

但我的应用程序未在 zipkin 服务器上列出,但也使用了正确的 jar,如下所示

    <dependency>
        <groupId>org.springframework.cloud</groupId>
        <artifactId>spring-cloud-starter-zipkin</artifactId>
        <version>2.0.2.RELEASE</version>
    </dependency>
    <dependency>
        <groupId>org.springframework.cloud</groupId>
        <artifactId>spring-cloud-starter-sleuth</artifactId>
        <version>2.0.2.RELEASE</version>
    </dependency>

【问题讨论】:

    标签: spring spring-boot


    【解决方案1】:

    在继续努力并通过spring boot应用程序的核心api后,我得到了我的解决方案:)

    我的问题的根本原因如下:

    我的应用程序使用 Spring boot RabitMQ 集成,因此 zipkin 将 1st prefrance 带到 RabitMQ 发件人,我的跟踪被忽略 我的 zipkin 服务器。

    所以使用下面的配置是任何人都有同样的问题以避免很多无痛的努力,即使我们没有得到服务器根本原因的日志

    *---

    spring:
      application:
        name: 'active-listener'
      profiles: 'dev'
      sleuth:
        async:
          enabled: false
        annotation:
          enabled: true
      enabled: true
      sampler:
        probability: 1.0
      zipkin:
        baseUrl: http://localhost:9411
        enabled: true
        sender:
          type: web*
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-08-03
      • 2017-07-13
      • 2019-08-16
      • 1970-01-01
      • 1970-01-01
      • 2021-04-17
      • 2020-12-12
      • 1970-01-01
      相关资源
      最近更新 更多