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 to the provided Brave Tracing component and uses an instance of BraveScopeManager for its ScopeManager. |
<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)
Returns a
BraveTracer.Builder configured with the provided Brave Tracing provided Brave
Tracing component and uses an instance of BraveScopeManager for its ScopeManager. |
io.opentracing.ScopeManager |
scopeManager() |
public static BraveTracer create(brave.Tracing brave4)
Tracer which delegates to the provided Brave Tracing component and uses an instance of BraveScopeManager for its ScopeManager.public static BraveTracer.Builder newBuilder(brave.Tracing brave4)
BraveTracer.Builder configured with the provided Brave Tracing provided Brave
Tracing component and uses an instance of BraveScopeManager for its ScopeManager.public io.opentracing.ScopeManager scopeManager()
scopeManager in interface io.opentracing.Tracerpublic 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.