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.
Note: make sure that an
io.opentracing.Tracer
bean is available. It is not provided by this library.
Add the following starter dependency to your pom.xml:
<dependency>
<groupId>io.opentracing.contrib</groupId>
<artifactId>opentracing-spring-messaging-starter</artifactId>
</dependency>
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);
}
Maven checkstyle plugin is used to maintain consistent code style based on Google Style Guides
./mvnw clean install
Follow instructions in RELEASE