Package 

Class AgentTracer.NoopAgentScope

  • 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
                        
    • Method Summary

      Modifier and Type Method Description
      AgentSpan span()
      byte source()
      void setAsyncPropagation(boolean value) Enable or disable async propagation.
      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.
      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.
      void close() Close the activated context and allow any underlying spans to finish.
      boolean isAsyncPropagating() If true, this context will propagate across async boundaries.
      • Methods inherited from class com.datadog.trace.bootstrap.instrumentation.api.AgentScope

        setAsyncPropagation
      • Methods inherited from class java.io.Closeable

        close
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • 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.