public final class BraveTracer extends Object implements io.opentracing.Tracer
Tracer tracer = BraveTracer.wrap(brave4);
Span span = tracer.buildSpan("DoWork").start();
tracer.inject(span.context());
...
SpanContext clientContext = tracer.extract(Format.Builtin.HTTP_HEADERS,
request.getHeaders());
Span clientSpan = tracer.buildSpan('...').asChildOf(clientContext).start();
BraveSpan,
Propagation| Modifier and Type | Class and Description |
|---|---|
static class |
BraveTracer.Builder |
| Modifier and Type | Method and Description |
|---|---|
io.opentracing.Tracer.SpanBuilder |
buildSpan(String operationName) |
static BraveTracer |
create(brave.Tracing brave4)
Returns an implementation of Tracer which delegates
the the provided Brave tracing component.
|
<C> io.opentracing.SpanContext |
extract(io.opentracing.propagation.Format<C> format,
C carrier)
Extracts the underlying context using B3 encoding by default.
|
<C> void |
inject(io.opentracing.SpanContext spanContext,
io.opentracing.propagation.Format<C> format,
C carrier)
Injects the underlying context using B3 encoding by default.
|
static BraveTracer.Builder |
newBuilder(brave.Tracing brave4) |
public static BraveTracer create(brave.Tracing brave4)
public static BraveTracer.Builder newBuilder(brave.Tracing brave4)
public io.opentracing.Tracer.SpanBuilder buildSpan(String operationName)
buildSpan in interface io.opentracing.Tracerpublic <C> void inject(io.opentracing.SpanContext spanContext,
io.opentracing.propagation.Format<C> format,
C carrier)
inject in interface io.opentracing.Tracerpublic <C> io.opentracing.SpanContext extract(io.opentracing.propagation.Format<C> format,
C carrier)
extract in interface io.opentracing.TracerCopyright © 2016–2017 OpenZipkin. All rights reserved.