public static class NoopTraceScope.NoopContinuation extends Object implements TraceScope.Continuation
| Modifier and Type | Field and Description |
|---|---|
static NoopTraceScope.NoopContinuation |
INSTANCE |
| Modifier and Type | Method and Description |
|---|---|
TraceScope |
activate()
Activate the continuation.
|
void |
cancel()
Allow trace to stop waiting on this continuation for reporting.
|
TraceScope.Continuation |
hold()
Prevent the trace attached to this scope from reporting until the continuation is explicitly
cancelled.
|
public static final NoopTraceScope.NoopContinuation INSTANCE
public TraceScope.Continuation hold()
TraceScope.ContinuationTraceScope.Continuation.cancel() at some point to avoid discarding traces.
Use this when you want to let multiple threads activate the continuation concurrently and close their scopes without fear of prematurely closing the related span.
hold in interface TraceScope.Continuationpublic TraceScope activate()
TraceScope.ContinuationShould be called on the child thread.
Consider calling this in a try-with-resources initialization block to ensure the returned scope is closed properly.
activate in interface TraceScope.Continuationpublic void cancel()
TraceScope.Continuationcancel in interface TraceScope.Continuation