public class NoopTraceScope extends Object implements TraceScope
| Modifier and Type | Class and Description |
|---|---|
static class |
NoopTraceScope.NoopContinuation |
TraceScope.Continuation| Modifier and Type | Field and Description |
|---|---|
static NoopTraceScope |
INSTANCE |
| Modifier and Type | Method and Description |
|---|---|
TraceScope.Continuation |
capture()
Prevent the trace attached to this TraceScope from reporting until the returned Continuation is
either activated (and the returned scope is closed), or canceled.
|
TraceScope.Continuation |
captureConcurrent()
Prevent the trace attached to this TraceScope from reporting until the returned Continuation is
either activated (and the returned scope is closed), or canceled.
|
void |
close()
Close the activated context and allow any underlying spans to finish.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisAsyncPropagating, setAsyncPropagationpublic static final NoopTraceScope INSTANCE
public TraceScope.Continuation capture()
TraceScopeShould be called on the parent thread.
capture in interface TraceScopepublic TraceScope.Continuation captureConcurrent()
TraceScopeShould be called on the parent thread.
If the returned TraceScope.Continuation is activated, it needs to be canceled in addition to
the returned TraceScope being closed. This is to allow multiple concurrent threads that
activate the continuation to race in a safe way, and close the scopes without fear of closing
the related Span prematurely.
captureConcurrent in interface TraceScopepublic void close()
TraceScopeclose in interface TraceScopeclose in interface Closeableclose in interface AutoCloseable