-
- All Implemented Interfaces:
-
com.datadog.trace.bootstrap.instrumentation.api.AgentScopeManager,com.datadog.trace.bootstrap.instrumentation.api.ScopeStateAware
public final class ContinuableScopeManager implements AgentScopeManager
The primary ScopeManager. This class has ownership of the core ThreadLocal containing the currently active Scope. Such scopes can be suspended with a Continuation to prevent the trace from being reported even if all related spans are finished. It also delegates to other ScopeInterceptors to provide additional functionality.
-
-
Constructor Summary
Constructors Constructor Description ContinuableScopeManager(int depthLimit, boolean strictMode, boolean inheritAsyncPropagation, InternalLogger internalLogger)Constructor with NOOP Profiling and HealthMetrics implementations. ContinuableScopeManager(int depthLimit, boolean strictMode, boolean inheritAsyncPropagation, ProfilingContextIntegration profilingContextIntegration, HealthMetrics healthMetrics, InternalLogger internalLogger)Default constructor.
-
Method Summary
Modifier and Type Method Description AgentScopeactivate(AgentSpan span, ScopeSource source)AgentScopeactivate(AgentSpan span, ScopeSource source, boolean isAsyncPropagating)AgentScope.ContinuationcaptureSpan(AgentSpan span)voidclosePrevious(boolean finishSpan)AgentScopeactivateNext(AgentSpan span)AgentScopeactive()AgentSpanactiveSpan()voidaddScopeListener(ScopeListener listener)Attach a listener to scope activation events ScopeStatenewScopeState()-
-
Constructor Detail
-
ContinuableScopeManager
ContinuableScopeManager(int depthLimit, boolean strictMode, boolean inheritAsyncPropagation, InternalLogger internalLogger)
Constructor with NOOP Profiling and HealthMetrics implementations.- Parameters:
depthLimit- The maximum scope depth limit,0for unlimited.strictMode- Whether check if the closed spans are the active ones or not.inheritAsyncPropagation- Whether the next span should inherit the active spanasyncPropagation flag.
-
ContinuableScopeManager
ContinuableScopeManager(int depthLimit, boolean strictMode, boolean inheritAsyncPropagation, ProfilingContextIntegration profilingContextIntegration, HealthMetrics healthMetrics, InternalLogger internalLogger)
Default constructor.- Parameters:
depthLimit- The maximum scope depth limit,0for unlimited.strictMode- Whether check if the closed spans are the active ones or not.inheritAsyncPropagation- Whether the next span should inherit the active spanasyncPropagation flag.
-
-
Method Detail
-
activate
AgentScope activate(AgentSpan span, ScopeSource source)
-
activate
AgentScope activate(AgentSpan span, ScopeSource source, boolean isAsyncPropagating)
-
captureSpan
AgentScope.Continuation captureSpan(AgentSpan span)
-
closePrevious
void closePrevious(boolean finishSpan)
-
activateNext
AgentScope activateNext(AgentSpan span)
-
active
AgentScope active()
-
activeSpan
AgentSpan activeSpan()
-
addScopeListener
void addScopeListener(ScopeListener listener)
Attach a listener to scope activation events
-
newScopeState
ScopeState newScopeState()
-
-
-
-