Package brave.propagation
Class StrictScopeDecorator
- java.lang.Object
-
- brave.propagation.StrictScopeDecorator
-
- All Implemented Interfaces:
CurrentTraceContext.ScopeDecorator
public final class StrictScopeDecorator extends java.lang.Object implements CurrentTraceContext.ScopeDecorator
Useful when developing instrumentation as state is enforced more strictly.Ex.
tracing = Tracing.newBuilder() .spanReporter(...) .currentTraceContext(ThreadLocalCurrentTraceContext.newBuilder() .addScopeDecorator(StrictScopeDecorator.create()) .build() ).build();
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static CurrentTraceContext.ScopeDecorator
create()
CurrentTraceContext.Scope
decorateScope(TraceContext currentSpan, CurrentTraceContext.Scope scope)
Identifies problems by throwing assertion errors when a scope is closed on a different thread.
-
-
-
Method Detail
-
create
public static CurrentTraceContext.ScopeDecorator create()
-
decorateScope
public CurrentTraceContext.Scope decorateScope(@Nullable TraceContext currentSpan, CurrentTraceContext.Scope scope)
Identifies problems by throwing assertion errors when a scope is closed on a different thread.- Specified by:
decorateScope
in interfaceCurrentTraceContext.ScopeDecorator
-
-