why need Spring sleuth when spring-cloud-starter-zipkin uses zipkin.brave?
Asked Answered
S

1

8

Adding just spring-cloud-starter-zipkin also able to generate spanId and TraceId so what is the need of Sleuth? spring-cloud-starter-zipkin actually pulling io.zipkin.brave by itself not Sleuth.

Schifra answered 25/8, 2021 at 17:39 Comment(0)
L
15

spring-cloud-starter-zipkin is deprecated, you should not use it anymore. You can use spring-cloud-starter-sleuth and spring-cloud-sleuth-zipkin (3.x).

If you check the dependencies of spring-cloud-starter-zipkin you will see that it depends on spring-cloud-starter-sleuth and spring-cloud-sleuth-zipkin so it is pulling in Sleuth and Sleuth's Zipkin support (which pulls in Brave).

From the high level point of view Sleuth is doing three things:

  1. It provides an API abstraction for Tracing libraries (Brave is the default library under the hood, OTel is incubating and you can implement your own tracing library integration)
  2. Instruments other Spring Projects
  3. Integrates with other components (e.g.: log correlation, Tomcat access log support, etc.)

Please see the docs: https://docs.spring.io/spring-cloud-sleuth/docs/current/reference/htmlsingle/

Lass answered 25/8, 2021 at 20:24 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.