Spring boot 如何在Sleuth版本2.0.4中使用java检索spanid
我需要知道java代码中的SpandId,但我不知道如何获得它。我一直在搜索,发现很多人都提到Tracer类,但它在sleuth 2.0.4中不可用 有人知道如何使用sleuth 2.0.4获得斯潘迪德吗Spring boot 如何在Sleuth版本2.0.4中使用java检索spanid,spring-boot,trace,spring-cloud-sleuth,zipkin,Spring Boot,Trace,Spring Cloud Sleuth,Zipkin,我需要知道java代码中的SpandId,但我不知道如何获得它。我一直在搜索,发现很多人都提到Tracer类,但它在sleuth 2.0.4中不可用 有人知道如何使用sleuth 2.0.4获得斯潘迪德吗 谢谢 只需注入brave.Tracerbean,然后就可以调用Tracer.currentSpan().context().spanId()或Tracer.currentSpan().context().spanIdString()
谢谢 只需注入
brave.Tracer
bean,然后就可以调用Tracer.currentSpan().context().spanId()
或Tracer.currentSpan().context().spanIdString()