Jaeger Bindings for Java OpenTracing API
The group ID
com.uber.jaegerhas been deprecated and moved to a different repository. Please switch to
io.jaegertracing, as the old group ID will be maintained only for bug fixes.
Please see CONTRIBUTING.md.
Click through for more detailed docs on specific modules.
TracingResolverfor the Jaeger Tracer.
In the usual case, you just need to include the following dependency to your project:
xml io.jaegertracing jaeger-client $jaegerVersion
This will bring a concrete sender, such as
jaeger-thrift, as well as the
The Jaeger Java Client uses
org.apache.thrift:libthrift:0.11.0. By default, declaring a dependency on the
jaeger-thriftmodule will bring a non-shaded version of Thrift (and others). A shaded version of the dependency is available with the classifier
Please see jaeger-core/README.
When testing tracing instrumentation it is often useful to make sure that all spans are being captured, which is not the case in production configurations where heavy sampling is applied by default. The following configuration can be provided to affect which sampling is applied to the new traces:
sampler: type: const # can either be const, probabilistic, or ratelimiting param: 1 # can either be an integer, a double, or an integer
The valid values for
const: configures a sampler that always makes the same decision for new traces depending on the
param: always no for
param=0, always yes otherwise. *
probabilistic: configures a sampler that samples traces with probability equal to
param(must be between
ratelimiting: configures a samlper that samples traces with a certain rate per second equal to
The OpenTracing API defines a
sampling.prioritystandard tag that can be used to affect the sampling of a span and its children:
Jaeger Tracer also understands a special HTTP Header
jaeger-debug-id, which can be set in the incoming request, e.g.
curl -H "jaeger-debug-id: some-correlation-id" http://myhost.com
When Jaeger sees this header in the request that otherwise has no tracing context, it ensures that the new trace started for this request will be sampled in the "debug" mode (meaning it should survive all downsampling that might happen in the collection pipeline), and the root span will have a tag as if this statement was executed:
This allows using Jaeger UI to find the trace by this tag.