Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Spring Cloud Sleuth with OpenTracing

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

like image 786
Javier Sainz Avatar asked May 24 '17 18:05

Javier Sainz


2 Answers

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

like image 156
Anoop Hallimala Avatar answered Sep 30 '22 19:09

Anoop Hallimala


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.

like image 43
Marcin Grzejszczak Avatar answered Sep 30 '22 20:09

Marcin Grzejszczak