Interface TraceState


  • public interface TraceState
    Encapsulation of thread-local state used for tracing. The implementor must ensure this is not passed across threads.
    • Method Summary

      Modifier and Type Method Description
      int getAndIncrementCounter()
      returns and increments a counter which can be used for labeling events.
      Deque<InvocationRecording> getRecordings()
      Get the stack of recordings.
      long getTraceId()
      The trace ID - corresponds to a single request or query
      void resetCounter()
      Sets the counter to its undefined base value.
      void setTraceId​(long traceId)
      Set the trace ID
    • Method Detail

      • getTraceId

        long getTraceId()
        The trace ID - corresponds to a single request or query
      • setTraceId

        void setTraceId​(long traceId)
        Set the trace ID
      • getAndIncrementCounter

        int getAndIncrementCounter()
        returns and increments a counter which can be used for labeling events.
      • resetCounter

        void resetCounter()
        Sets the counter to its undefined base value.
      • getRecordings

        Deque<InvocationRecording> getRecordings()
        Get the stack of recordings. The implementor is responsible for ensuring only recordings started on the current thread are added to this stack.