OpenTracing Spring Messaging
This repository provides OpenTracing instrumentation for various frameworks that use Spring Messaging (e.g. Spring Cloud Stream). It can be used with any OpenTracing compatible implementation. It implements Spring Messaging ChannelInterceptor interface and registers as a global channel interceptor.
Configuration
Note: make sure that an
io.opentracing.Tracer
bean is available. It is not provided by this library.
Spring Boot
Add the following starter dependency to your pom.xml:
<dependency>
<groupId>io.opentracing.contrib</groupId>
<artifactId>opentracing-spring-messaging-starter</artifactId>
</dependency>
Spring
Add the following dependency to your pom.xml:
<dependency>
<groupId>io.opentracing.contrib</groupId>
<artifactId>opentracing-spring-messaging</artifactId>
</dependency>
And register an interceptor bean:
@Bean
@GlobalChannelInterceptor
public OpenTracingChannelInterceptor openTracingChannelInterceptor(Tracer tracer) {
return new OpenTracingChannelInterceptor(tracer);
}
Development
Maven checkstyle plugin is used to maintain consistent code style based on Google Style Guides
./mvnw clean install
Release
Follow instructions in RELEASE