Skip to content

opentracing-contrib/java-asynchttpclient

Repository files navigation

Build Status Coverage Status Released Version Apache-2.0 license

OpenTracing Instrumentation for org.asynchttpclient

Requirements

Installation

Releases are hosted on Maven Central.

pom.xml

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

Usage

// Instantiate tracer
Tracer tracer = ...


// Build TracingAsyncHttpClient
AsyncHttpClient client = new TracingAsyncHttpClient(tracer);

// By default spans are always created
// To trace only if there is an active span
// Build TracingAsyncHttpClient with optional parameter set to true
AsyncHttpClient client = new TracingAsyncHttpClient(tracer, true);

License

Apache 2.0 License.