-
- All Implemented Interfaces:
-
java.io.Closeable,java.lang.AutoCloseable
public interface TraceScope implements Closeable
An object which can propagate a datadog trace across multiple threads.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceTraceScope.ContinuationUsed to pass async context between workers.
-
Method Summary
Modifier and Type Method Description abstract TraceScope.Continuationcapture()Prevent the trace attached to this TraceScope from reporting until the returned Continuationfinishes. abstract voidclose()Close the activated context and allow any underlying spans to finish. abstract booleanisAsyncPropagating()If true, this context will propagate across async boundaries. abstract voidsetAsyncPropagation(boolean value)Enable or disable async propagation. -
-
Method Detail
-
capture
abstract TraceScope.Continuation capture()
Prevent the trace attached to this TraceScope from reporting until the returned Continuationfinishes.
Should be called on the parent thread.
-
close
abstract void close()
Close the activated context and allow any underlying spans to finish.
-
isAsyncPropagating
abstract boolean isAsyncPropagating()
If true, this context will propagate across async boundaries.
-
setAsyncPropagation
abstract void setAsyncPropagation(boolean value)
Enable or disable async propagation. Async propagation is initially set to false.
- Parameters:
value- The new propagation value.
-
-
-
-