Build Status Released Version

OpenTracing Spring Cloud

This repository provides OpenTracing instrumentation for Spring Boot and its various extensions. It can be used with any OpenTracing compatible implementation.

It contains auto-configurations which instruments and trace following Spring Boot projects:

Compatibility table

The following table shows versions with compatible Spring Cloud releases.

opentracing-spring-cloud version OpenTracing API Spring Cloud version
0.5.x 0.33.0 Hoxton
0.4.x 0.32.0 Hoxton
0.3.x 0.32.0 Greenwhich
0.2.x 0.31.0 Finchley, Greenwhich
0.1.x 0.31.0 Dalston, Edgware

Comparison to spring-cloud-sleuth

This project is similar to spring-cloud-sleuth, both provide out of the box tracing solution for Spring Boot/Cloud. Some of the instrumentations in this package are based on original sleuth work.

However there are a couple of differences:

Note on dependencies

It's worth noting that the although OpenTracing Spring Cloud contains code for instrumenting a wealth of Spring projects, it however does not pull those dependencies automatically, marking them as optional dependencies instead.

That means that for example a simple Spring Boot REST API application can include OpenTracing Spring Cloud without the fear of polluting the classpath with Spring Cloud dependencies that are otherwise unneeded


The preferred way to use this library is via vendored starters. These starters use instrumentations from this library and expose specific tracer configuration in Spring native way:

Explicitly tracer configuration

Just add the following dependency in your pom.xml:


, and provide OpenTracing tracer bean:

public io.opentracing.Tracer tracer() {
  return new // tracer instance of your choice (Zipkin, Jaeger, LightStep)


Property Default Description true Enable Reactor tracing. true Enable tracing for @Async, Executor and WebAsyncTask/Callable. true Add standard logging output to tracing system. true Enable @Scheduled tracing. true Enable Feign tracing. true Enable Gateway tracing. true Enable Propagation of spans across threads using in Hystrix command tracing. true Enable JDBC tracing. true Enable JMS tracing. true Enable Kafka tracing. true Enable MongoDB tracing. true Enable Reactor tracing. true Enable RxJava tracing. true Enable Websocket tracing. true Enable Zuul tracing. true Enable Redis tracing. "" Set a prefix for each Redis operation, e.g: MyPrefix.SET. false Only trace JDBC calls if they are part of an active Span. null Set of JDBC statements to not trace.


Maven checkstyle plugin is used to maintain consistent code style based on Google Style Guides

./mvnw clean install
make // to run tests including dependency tests, a specific profile can be specified by make PROFILES=nodeps


Follow instructions in RELEASE


Apache 2.0 License.