public static final class BraveTracer.Builder extends Object
| Modifier and Type | Method and Description |
|---|---|
BraveTracer.Builder |
activeScopeManager(io.opentracing.ScopeManager scopeManager)
By default, this builder uses BraveActiveSpanSource, which delegates management of the active
span to Brave and acts as a simple wrapper.
|
BraveTracer |
build() |
BraveTracer.Builder |
textMapPropagation(io.opentracing.propagation.Format<io.opentracing.propagation.TextMap> format,
brave.propagation.Propagation<String> propagation)
By default,
Format.Builtin#HTTP_HEADERS and Format.Builtin#TEXT_MAP use the
propagation mechanism supplied by Tracing.propagation(), which defaults to B3 Propagation. |
public BraveTracer.Builder activeScopeManager(io.opentracing.ScopeManager scopeManager)
public BraveTracer.Builder textMapPropagation(io.opentracing.propagation.Format<io.opentracing.propagation.TextMap> format, brave.propagation.Propagation<String> propagation)
Format.Builtin#HTTP_HEADERS and Format.Builtin#TEXT_MAP use the
propagation mechanism supplied by Tracing.propagation(), which defaults to B3 Propagation. You can override or add different formats using this
method.
For example, instead of using implicit format keys in your code, you might want to explicitly declare you are using B3. To do so, you'd do setup the tracer like this:
builder.textMapPropagation(MyFormats.B3, Propagation.B3_STRING);
// later, you can ensure B3 is used like this:
tracer.extract(MyFormats.B3, textMap);
public BraveTracer build()
Copyright © 2016–2017 OpenZipkin. All rights reserved.