Package brave.baggage
Class CorrelationScopeDecorator.Builder
java.lang.Object
brave.baggage.CorrelationScopeDecorator.Builder
- Enclosing class:
- CorrelationScopeDecorator
public abstract static class CorrelationScopeDecorator.Builder extends Object
Defaults to
BaggageFields.TRACE_ID and BaggageFields.SPAN_ID.-
Constructor Summary
Constructors Modifier Constructor Description protectedBuilder(brave.internal.CorrelationContext context)Internal constructor used by subtypes. -
Method Summary
Modifier and Type Method Description CorrelationScopeDecorator.Builderadd(CorrelationScopeConfig config)CurrentTraceContext.ScopeDecoratorbuild()CorrelationScopeDecorator.Builderclear()Invoke this to clear fields so that you can add the ones you need.Set<CorrelationScopeConfig>configs()Returns an immutable copy of the current configuration.
-
Constructor Details
-
Builder
protected Builder(brave.internal.CorrelationContext context)Internal constructor used by subtypes.
-
-
Method Details
-
configs
Returns an immutable copy of the current configuration. This allows those who can't create the builder to reconfigure this builder.- Since:
- 5.11
- See Also:
clear()
-
clear
Invoke this to clear fields so that you can add the ones you need.Defaults may include a field you aren't using, such as
BaggageFields.PARENT_ID. For best performance, only include the fields you use in your correlation expressions (such as log formats).- Since:
- 5.11
- See Also:
configs(),CorrelationScopeDecorator
-
add
- Since:
- 5.11
-
build
- Returns:
CurrentTraceContext.ScopeDecorator.NOOPif no baggage fields were added.
-