public final class StrictCurrentTraceContext extends CurrentTraceContext
For example, it is instance scoped as opposed to static scoped, not inheritable and throws an exception if a scope is closed on a different thread that it was opened on.
CurrentTraceContext.Default
CurrentTraceContext.Default, CurrentTraceContext.Scope
Constructor and Description |
---|
StrictCurrentTraceContext() |
Modifier and Type | Method and Description |
---|---|
TraceContext |
get()
Returns the current span in scope or null if there isn't one.
|
CurrentTraceContext.Scope |
newScope(TraceContext currentSpan)
Identifies problems by throwing assertion errors when a scope is closed on a different thread.
|
executor, executorService, wrap, wrap
public TraceContext get()
CurrentTraceContext
get
in class CurrentTraceContext
public CurrentTraceContext.Scope newScope(@Nullable TraceContext currentSpan)
newScope
in class CurrentTraceContext
currentSpan
- span to place into scope or null to clear the scopeCopyright © 2017 OpenZipkin. All rights reserved.