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 toBaggageFields.TRACE_IDandBaggageFields.SPAN_ID.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedBuilder(brave.internal.CorrelationContext context)Internal constructor used by subtypes.
-
Method Summary
All Methods Instance Methods Concrete Methods 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.
-
-
-
Method Detail
-
configs
public Set<CorrelationScopeConfig> 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
public CorrelationScopeDecorator.Builder 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
public CorrelationScopeDecorator.Builder add(CorrelationScopeConfig config)
- Since:
- 5.11
-
build
public final CurrentTraceContext.ScopeDecorator build()
- Returns:
CurrentTraceContext.ScopeDecorator.NOOPif no baggage fields were added.
-
-