Package brave.context.log4j2
Class ThreadContextScopeDecorator
- java.lang.Object
-
- brave.context.log4j2.ThreadContextScopeDecorator
-
public final class ThreadContextScopeDecorator extends Object
Creates aCorrelationScopeDecoratorfor Log4j 2 Thread Context.Ex.
tracing = Tracing.newBuilder() .currentTraceContext(ThreadLocalCurrentTraceContext.newBuilder() .addScopeDecorator(ThreadContextScopeDecorator.get()) .build() ) ... .build();- See Also:
CorrelationScopeDecorator
-
-
Constructor Summary
Constructors Constructor Description ThreadContextScopeDecorator()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static brave.propagation.CurrentTraceContext.ScopeDecoratorget()Returns a singleton that configuresBaggageFields.TRACE_IDandBaggageFields.SPAN_ID.static brave.baggage.CorrelationScopeDecorator.BuildernewBuilder()Returns a builder that configuresBaggageFields.TRACE_IDandBaggageFields.SPAN_ID.
-
-
-
Method Detail
-
get
public static brave.propagation.CurrentTraceContext.ScopeDecorator get()
Returns a singleton that configuresBaggageFields.TRACE_IDandBaggageFields.SPAN_ID.- Since:
- 5.11
-
newBuilder
public static brave.baggage.CorrelationScopeDecorator.Builder newBuilder()
Returns a builder that configuresBaggageFields.TRACE_IDandBaggageFields.SPAN_ID.- Since:
- 5.11
-
-