-
- All Implemented Interfaces:
-
com.datadog.trace.context.TraceScope,java.io.Closeable,java.lang.AutoCloseable
public interface AgentScope implements TraceScope, Closeable
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceAgentScope.Continuation
-
Method Summary
Modifier and Type Method Description abstract AgentSpanspan()abstract bytesource()abstract AgentScope.Continuationcapture()Prevent the trace attached to this TraceScope from reporting until the returned Continuation iseither activated (and the returned scope is closed), or canceled. abstract AgentScope.ContinuationcaptureConcurrent()Prevent the trace attached to this TraceScope from reporting until the returned Continuation iseither activated (and the returned scope is closed), or canceled. abstract voidsetAsyncPropagation(boolean value)Enable or disable async propagation. abstract voidclose()Close the activated context and allow any underlying spans to finish. -
-
Method Detail
-
source
abstract byte source()
-
capture
abstract AgentScope.Continuation capture()
Prevent the trace attached to this TraceScope from reporting until the returned Continuation iseither activated (and the returned scope is closed), or canceled.
Should be called on the parent thread.
-
captureConcurrent
abstract AgentScope.Continuation captureConcurrent()
Prevent the trace attached to this TraceScope from reporting until the returned Continuation iseither activated (and the returned scope is closed), or canceled.
Should be called on the parent thread.
If the returned Continuation is activated, it needs to be canceled in addition tothe returned TraceScope being closed. This is to allow multiple concurrent threads thatactivate the continuation to race in a safe way, and close the scopes without fear of closingthe related
{@code Span}prematurely.
-
setAsyncPropagation
abstract void setAsyncPropagation(boolean value)
Enable or disable async propagation. Async propagation is initially set to false.
- Parameters:
value- The new propagation value.
-
close
abstract void close()
Close the activated context and allow any underlying spans to finish.
-
-
-
-