public interface Scope extends Closeable
Scope formalizes the activation and deactivation of a Span, usually from a CPU standpoint.
Many times a Span will be extant (in that Span.finish() has not been called) despite being in a
non-runnable state from a CPU/scheduler standpoint. For instance, a Span representing the client side of an
RPC will be unfinished but blocked on IO while the RPC is still outstanding. A Scope defines when a given
Span is scheduled and on the path.
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Mark the end of the active period for the current thread and
Scope,
updating the ScopeManager.active() in the process. |
Span |
span() |
void close()
Scope,
updating the ScopeManager.active() in the process.
NOTE: Calling close() more than once on a single Scope instance leads to undefined
behavior.
close in interface AutoCloseableclose in interface CloseableCopyright © 2016–2017 OpenTracing. All rights reserved.