Package 

Interface TraceScope

  • All Implemented Interfaces:
    java.io.Closeable , java.lang.AutoCloseable

    
    public interface TraceScope
     implements Closeable
                        

    An object which can propagate a datadog trace across multiple threads.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      public interface TraceScope.Continuation

      Used to pass async context between workers.

    • Method Summary

      Modifier and Type Method Description
      abstract TraceScope.Continuation capture() Prevent the trace attached to this TraceScope from reporting until the returned Continuationfinishes.
      abstract void close() Close the activated context and allow any underlying spans to finish.
      abstract boolean isAsyncPropagating() If true, this context will propagate across async boundaries.
      abstract void setAsyncPropagation(boolean value) Enable or disable async propagation.
      • 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

      • capture

         abstract TraceScope.Continuation capture()

        Prevent the trace attached to this TraceScope from reporting until the returned Continuationfinishes.

        Should be called on the parent thread.

      • close

         abstract void close()

        Close the activated context and allow any underlying spans to finish.

      • isAsyncPropagating

         abstract boolean isAsyncPropagating()

        If true, this context will propagate across async boundaries.

      • setAsyncPropagation

         abstract void setAsyncPropagation(boolean value)

        Enable or disable async propagation. Async propagation is initially set to false.

        Parameters:
        value - The new propagation value.