/java-spring-cloud

Distributed tracing for Spring Cloud and Spring Boot

Primary LanguageJavaApache License 2.0Apache-2.0

Build Status Released Version

Note: this is under an active development!

OpenTracing Spring Cloud

This repository provides OpenTracing instrumentation for Spring Cloud. It can be used with any OpenTracing compatible implementation.

It contains auto-configurations for Spring Boot which will instrument and trace several Spring Cloud and other integrations:

  • Spring Web (RestControllers, RestTemplates, WebAsyncTask)
  • @Async, @Scheduled, Executors
  • WebSocket STOMP
  • Feign, HystrixFeign
  • Hystrix
  • JMS
  • JDBC
  • Zuul

This library is compatible with Spring Cloud Camden.SR7, Dalston.SR3 and Edgware.RELEASE

Comparison to spring-cloud-sleuth

spring-cloud-sleuth also instruments a number of different frameworks. However, it is not currently possible to use it with the OpenTracing API, or wire different instrumentations that are not supported by sleuth.

Configuration

Just add the following dependency in your pom.xml:

<dependency>
  <groupId>io.opentracing.contrib</groupId>
  <artifactId>opentracing-spring-cloud-starter</artifactId>
</dependency>

, and provide OpenTracing tracer bean:

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

Development

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

Release

Follow instructions in RELEASE