Package datadog.trace.context
Class NoopTraceScope.NoopContinuation
java.lang.Object
datadog.trace.context.NoopTraceScope.NoopContinuation
- All Implemented Interfaces:
TraceScope.Continuation
- Enclosing class:
NoopTraceScope
public static class NoopTraceScope.NoopContinuation
extends Object
implements TraceScope.Continuation
-
Field Details
-
INSTANCE
-
-
Method Details
-
hold
Description copied from interface:TraceScope.ContinuationPrevent the trace attached to this scope from reporting until the continuation is explicitly cancelled. You must callTraceScope.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.
- Specified by:
holdin interfaceTraceScope.Continuation
-
activate
Description copied from interface:TraceScope.ContinuationActivate the continuation.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.
- Specified by:
activatein interfaceTraceScope.Continuation
-
cancel
public void cancel()Description copied from interface:TraceScope.ContinuationAllow trace to stop waiting on this continuation for reporting.- Specified by:
cancelin interfaceTraceScope.Continuation
-