Package brave.context.log4j12
Class MDCScopeDecorator
- java.lang.Object
-
- brave.context.log4j12.MDCScopeDecorator
-
public final class MDCScopeDecorator extends Object
Creates aCorrelationScopeDecorator
for Log4j 1.2 Mapped Diagnostic Context (MDC).Ex.
tracing = Tracing.newBuilder() .currentTraceContext(ThreadLocalCurrentTraceContext.newBuilder() .addScopeDecorator(MDCScopeDecorator.get()) .build() ) ... .build();
- See Also:
CorrelationScopeDecorator
-
-
Constructor Summary
Constructors Constructor Description MDCScopeDecorator()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static brave.propagation.CurrentTraceContext.ScopeDecorator
get()
Returns a singleton that configuresBaggageFields.TRACE_ID
andBaggageFields.SPAN_ID
.static brave.baggage.CorrelationScopeDecorator.Builder
newBuilder()
Returns a builder that configuresBaggageFields.TRACE_ID
andBaggageFields.SPAN_ID
.
-
-
-
Method Detail
-
get
public static brave.propagation.CurrentTraceContext.ScopeDecorator get()
Returns a singleton that configuresBaggageFields.TRACE_ID
andBaggageFields.SPAN_ID
.- Since:
- 5.11
-
newBuilder
public static brave.baggage.CorrelationScopeDecorator.Builder newBuilder()
Returns a builder that configuresBaggageFields.TRACE_ID
andBaggageFields.SPAN_ID
.- Since:
- 5.11
-
-