Skip to content

Latest commit

 

History

History
54 lines (38 loc) · 1.64 KB

README.md

File metadata and controls

54 lines (38 loc) · 1.64 KB

Build Status Coverage Status Released Version Apache-2.0 license

OpenTracing RabbitMQ Client Instrumentation

OpenTracing instrumentation for RabbitMQ Client.

Installation

pom.xml

<dependency>
    <groupId>io.opentracing.contrib</groupId>
    <artifactId>opentracing-rabbitmq-client</artifactId>
    <version>VERSION</version>
</dependency>

Usage

// Instantiate tracer
Tracer tracer = ...

// Optionally register tracer with GlobalTracer
GlobalTracer.register(tracer);

// Decorate RabbitMQ Channel with TracingChannel
TracingChannel tracingChannel = new TracingChannel(channel, tracer);

// Send
tracingChannel.basicPublish(...);

// Get
GetResponse response = tracingChannel.basicGet(queueName, false);

// Consume
tracingChannel.basicConsume(...);

// Factory
ConnectionFactory factory = new TracingConnectionFactory(tracer);
Connection connection = factory.newConnection();

License

Apache 2.0 License.