Search code examples
spring-cloud-streamspring-cloud-dataflowzipkin

In order to use zipkin in scdf, what dependencies do I need to add?


I want to use zipkin in my scdf(Spring Cloud Dataflow) applications.According to the scdf documentation I just need to add the following dependencies, and add settings in application.properties, I can use zipkin in scdf.

pom.xml

<dependencies>
    <dependency>
      <groupId>org.springframework.cloud</groupId>
      <artifactId>spring-cloud-starter-sleuth</artifactId>
  </dependency>
  <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-actuator</artifactId>
  </dependency>
    <dependency>
      <groupId>org.springframework.cloud</groupId>
      <artifactId>spring-cloud-sleuth-zipkin</artifactId>
  </dependency>
    <dependency>
      <groupId>io.micrometer</groupId>
      <artifactId>micrometer-registry-wavefront</artifactId>
  </dependency>
</dependencies>

<dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-dependencies</artifactId>
            <version>${release.train.version}</version>
            <type>pom</type>
            <scope>import</scope>
        </dependency>
    </dependencies>
</dependencyManagement>

applicaion.properties

spring.zipkin.enabled=true

But in fact I didn't get the expected results.

enter image description here

enter image description here

I don't have any information about the source-processor-sink internals, can anyone explain this? What other dependencies do I need to add and what configuration do I need to set?


Solution

  • I already know why, you need to add the following configuration to the application.properties file.

    • spring.sleuth.sampler.probability=1.0

    I will close this question and the answer will be a memo.