public static interface TraceScope.Continuation
| 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.
|
TraceScope.Continuation hold()
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.
TraceScope activate()
Should be called on the child thread.
Consider calling this in a try-with-resources initialization block to ensure the returned scope is closed properly.
void cancel()