Spring spring-cloud-sleuth 中没有 Sleuth Tracer - 有什么替代方案?
Spring Sleuth Tracer not there in spring-cloud-sleuth - What is the alternative?
我已使用 org.springframework.cloud.sleuth.Tracer
(1.3.x) 获取当前 Span 和 Trace id。看起来 spring-cloud-sleuth-core
的 2.x 版本已经摆脱了它,经过大量搜索后,没有明显的替代品。请帮忙。
Sleuth 2.x 建立在 Brave. You can check the 1.3 -> 2.x Migration Guide 之上以了解如何迁移。
准确回答您的问题:Sleuth's Tracer 已替换为 brave.Tracer
,您可以注入并使用它。
请注意 Sleuth 3.x 已经发布,还有一个 2.x -> 3.x Migration-Guide。在 3.0 中,Sleuth 将跟踪库抽象化,因此 3.x.
中有一个 Sleuth Tracer
我建议升级到最新版本的 Sleuth(这也意味着升级到最新的 Spring Boot 和 Spring Cloud)。
我已使用 org.springframework.cloud.sleuth.Tracer
(1.3.x) 获取当前 Span 和 Trace id。看起来 spring-cloud-sleuth-core
的 2.x 版本已经摆脱了它,经过大量搜索后,没有明显的替代品。请帮忙。
Sleuth 2.x 建立在 Brave. You can check the 1.3 -> 2.x Migration Guide 之上以了解如何迁移。
准确回答您的问题:Sleuth's Tracer 已替换为 brave.Tracer
,您可以注入并使用它。
请注意 Sleuth 3.x 已经发布,还有一个 2.x -> 3.x Migration-Guide。在 3.0 中,Sleuth 将跟踪库抽象化,因此 3.x.
中有一个 Sleuth Tracer我建议升级到最新版本的 Sleuth(这也意味着升级到最新的 Spring Boot 和 Spring Cloud)。