Interface CurrentTraceContext.ScopeDecorator

All Known Implementing Classes:
CorrelationScopeDecorator, StrictScopeDecorator
Enclosing class:
CurrentTraceContext

public static interface CurrentTraceContext.ScopeDecorator
Use this to add features such as thread checks or log correlation when a scope is created or closed.

While decoration technically occurs with CurrentTraceContext.newScope(TraceContext) or CurrentTraceContext.maybeScope(TraceContext), many tools use these underneath. For example, Tracer.startScopedSpan(String) and Tracer.withSpanInScope(brave.Span) set a span in scope. An executor wrapped with CurrentTraceContext.executor(Executor) would decorate each runnable.

Since:
5.2