-1

what are the best practices in tracing of spring boot 2 microservice applications? I found some 2 years old tutorials where tracing server was as another spring boot application with following dependencies:

    <dependency>
        <groupId>io.zipkin.java</groupId>
        <artifactId>zipkin-server</artifactId>
    </dependency>
    <dependency>
        <groupId>io.zipkin.java</groupId>
        <artifactId>zipkin-autoconfigure-ui</artifactId>
        <scope>runtime</scope>
    </dependency>

and push traces with following configuration:

<dependency>
    <groupId>org.springframework.cloud</groupId>
    <artifactId>spring-cloud-starter-zipkin</artifactId>
</dependency>

and

spring.zipkin.base-url=http://localhost:9411/
spring.sleuth.sampler.probability=1

Is this solution still actual and suitable for production or should we configure standalone docker image of zipkin instead of spring boot app and connect it to ELK stack with logs? What do you recommended? It will be great if you can provide some example what is recommended approach to handle it in. Thank you in advice.

Denis Stephanov
  • 4,563
  • 24
  • 78
  • 174

1 Answers1

1

You can use spring cloud sleuth. Please check the documentation for examples of using elk stack to harvest the logs. The zipkin server can be fetched as a standalone jar, you don't need to create your custom version

Marcin Grzejszczak
  • 10,624
  • 1
  • 16
  • 32
  • I am aware I need to use sleuth, but sleuth process logs and add tracing ids into MDC right? But my primary question was if I should use zipkin server as spring boot app with dependencies as I wrote above or rather use zipkin docker image from docker hub? Thank you – Denis Stephanov Dec 16 '19 at 12:52
  • Preferably just use the docker image and don't create your custom servers – Marcin Grzejszczak Dec 16 '19 at 13:04