-
- All Implemented Interfaces:
-
com.datadog.trace.bootstrap.instrumentation.api.AgentScope,com.datadog.trace.context.TraceScope,java.io.Closeable,java.lang.AutoCloseable
public final class AgentTracer.NoopAgentScope implements AgentScope
-
-
Field Summary
Fields Modifier and Type Field Description public final static AgentTracer.NoopAgentScopeINSTANCE
-
Method Summary
Modifier and Type Method Description AgentSpanspan()bytesource()voidsetAsyncPropagation(boolean value)Enable or disable async propagation. 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. 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. voidclose()Close the activated context and allow any underlying spans to finish. booleanisAsyncPropagating()If true, this context will propagate across async boundaries. -
-
Method Detail
-
source
byte source()
-
setAsyncPropagation
void setAsyncPropagation(boolean value)
Enable or disable async propagation. Async propagation is initially set to false.
- Parameters:
value- The new propagation value.
-
capture
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
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.
-
close
void close()
Close the activated context and allow any underlying spans to finish.
-
isAsyncPropagating
boolean isAsyncPropagating()
If true, this context will propagate across async boundaries.
-
-
-
-