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.
why need Spring sleuth when spring-cloud-starter-zipkin uses zipkin.brave?
Asked Answered
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:
- 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)
- Instruments other Spring Projects
- 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/
© 2022 - 2024 — McMap. All rights reserved.