Package 

Interface AgentScope

  • All Implemented Interfaces:
    com.datadog.trace.context.TraceScope , java.io.Closeable , java.lang.AutoCloseable

    
    public interface AgentScope
     implements TraceScope, Closeable
                        
    • Method Summary

      Modifier and Type Method Description
      abstract AgentSpan span()
      abstract byte source()
      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.
      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.
      abstract void setAsyncPropagation(boolean value) Enable or disable async propagation.
      abstract void close() Close the activated context and allow any underlying spans to finish.
      • Methods inherited from class com.datadog.trace.context.TraceScope

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

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