public static final class DefaultContextPropagators.Builder extends Object
DefaultContextPropagators.Builder is used to construct a new ContextPropagators object with the specified
propagators.
This is a example of a ContextPropagators object being created:
ContextPropagators propagators = DefaultContextPropagators.builder()
.addHttpTextFormat(new HttpTraceContext())
.addHttpTextFormat(new HttpCorrelationContext())
.addHttpTextFormat(new MyCustomContextPropagator())
.build();
| Constructor and Description |
|---|
Builder() |
| Modifier and Type | Method and Description |
|---|---|
DefaultContextPropagators.Builder |
addHttpTextFormat(HttpTextFormat textFormat)
Adds a
HttpTextFormat propagator. |
ContextPropagators |
build()
Builds a new
ContextPropagators with the specified propagators. |
public DefaultContextPropagators.Builder addHttpTextFormat(HttpTextFormat textFormat)
HttpTextFormat propagator.
One propagator per concern (traces, correlations, etc) should be added if this format is supported.
textFormat - the propagator to be added.NullPointerException - if textFormat is null.public ContextPropagators build()
ContextPropagators with the specified propagators.ContextPropagators instance.