Skip to content
Branch: master
Find file History
dougEfresh and yurishkuro Add support for OpenTracing 0.32 (#567)
* Opentracing 0.32.0 support

Signed-off-by: Doug Chimento <>

* Use TextMapAdaptor in tests
Rename traceIdTextMapCodec -> traceIdAsString
Remove checking value type in withTag(Tag<?> tag, T value)

Signed-off-by: Doug Chimento <>

* Use TextMapAdaptor in thrift tests

Signed-off-by: Doug Chimento <>

* Remove unused imports in thrift tests

Signed-off-by: Doug Chimento <>

* Remove isFinished() in span

Signed-off-by: Doug Chimento <>
Latest commit 20ee4e8 Apr 10, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
src Fix Zipkin readme Jul 12, 2018
build.gradle Move jaeger-thrift shadow jar to its own classifier Aug 22, 2018


These components make Jaeger compatible with Zipkin instrumentation and transports.

For example, you can join traces with other Zipkin (B3) instrumented applications (such as Brave), and send spans to Zipkin on standard transports such as Http or Kafka.


To make Jaeger Zipkin-compatible, you need to register injectors and extractors, and configure a remote reporter.

B3 Propagation

Zipkin systems most often use B3 propagation. This includes setting and reading headers like "X-B3-TraceId". Once you register B3TextMapCodec, Jaeger can join traces started by other Zipkin instrumented applications.

For example:

b3Codec = new B3TextMapCodec();
tracer = new JaegerTracer.Builder(serviceName)
  .registerInjector(Format.Builtin.HTTP_HEADERS, b3Codec)
  .registerExtractor(Format.Builtin.HTTP_HEADERS, b3Codec)

Sending data to Zipkin

There are two ways to send spans to a Zipkin server:


If you want to send Zipkin v1 Thrift-encoded spans, you should use the ZipkinSender sender, which wraps a Zipkin sender class to enable the use of various transports such as HTTP and Kafka.

For example:

import io.jaegertracing.zipkin.ZipkinSender;

reporter = new RemoteReporter.Builder()

tracer = new JaegerTracer.Builder(serviceName)

Zipkin 2 Reporters

You can reuse a Zipkin 2 reporter instance as-is by using ZipkinV2Reporter, which adapts a Zipkin 2 reporter to the Jaeger reporter interface and deals with converting Jaeger spans to the Zipkin 2 model.

The following example requires the artifact io.zipkin.reporter2:zipkin-sender-urlconnection and shows how to accomplish that:

import io.jaegertracing.zipkin.ZipkinV2Reporter;
import zipkin2.reporter.AsyncReporter;
import zipkin2.reporter.urlconnection.URLConnectionSender;

reporter = new ZipkinV2Reporter(AsyncReporter.create(URLConnectionSender.create("http://localhost:9411/api/v2/spans")));

tracer = new JaegerTracer.Builder(serviceName)

This will send spans to the Zipkin v2 endpoint using the v2 JSON encoding.

You can’t perform that action at this time.