public final class BraveTracer extends Object implements io.opentracing.Tracer
Tracer tracer = BraveTracer.wrap(tracing);
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 |
|---|---|
BraveSpan |
activeSpan() |
BraveSpanBuilder |
buildSpan(String operationName) |
static BraveTracer |
create(brave.Tracing brave4)
Returns an implementation of
Tracer which delegates to the provided Brave Tracing component, which coordinates with Brave's CurrentTraceContext to implement
ScopeManager. |
<C> BraveSpanContext |
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. |
BraveScopeManager |
scopeManager() |
public static BraveTracer create(brave.Tracing brave4)
Tracer which delegates to the provided Brave Tracing component, which coordinates with Brave's CurrentTraceContext to implement
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 BraveScopeManager scopeManager()
scopeManager in interface io.opentracing.Tracerpublic BraveSpan activeSpan()
activeSpan in interface io.opentracing.Tracerpublic BraveSpanBuilder 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> BraveSpanContext extract(io.opentracing.propagation.Format<C> format, C carrier)
extract in interface io.opentracing.TracerCopyright © 2016–2018 OpenZipkin. All rights reserved.