7

Is there a way to use Spring Cloud Sleuth with OpenTracing? I want to connect Spring clients with Jaeger

Javier Sainz
  • 301
  • 1
  • 2
  • 7
  • You may want to try asking at https://gitter.im/spring-cloud/spring-cloud – Yuri Shkuro May 31 '17 at 14:55
  • Also, Jaeger now has an HTTP endpoint that can receive spans in Zipkin Thrift format. But because Sleuth is not supporting OpenTracing, you cannot actually use Jaeger Java client with it, so will be missing many of the features it provides, like adaptive sampling. – Yuri Shkuro Jun 21 '17 at 14:49
  • @Javier You got any solutions for this problem? – das Aug 30 '18 at 20:03
  • Not really, But now I just change the strategy and use what Spring had built in. – Javier Sainz Sep 05 '18 at 15:18

2 Answers2

16

Spring Sleuth is now OpenTracing compatible. All you have to do is use OpenTracing Jars in your class path.

You can then use Sleuth-Zipkin to send instrumentation data to Jaeger's Zipkin collector.

This way you achieve everything you want with minimal configuration.

You can use my sample program as an example here:

https://github.com/anoophp777/spring-webflux-jaegar-log4j2

Anoop Hallimala
  • 625
  • 1
  • 11
  • 25
2

There's an ongoing discussion over here - https://github.com/spring-cloud/spring-cloud-sleuth/issues/599 . In general we don't explicitly use the OpenTracing API but we are Zipkin compatible in terms of header propagation. You can also manipulate the header names as you wish so if any sort of library you're using requires other header names for span / trace etc. then you can set it yourself as you want to.

Marcin Grzejszczak
  • 10,624
  • 1
  • 16
  • 32