Class NoOpTraceContext

    • Method Detail

      • isRootContext

        public boolean isRootContext()
        Description copied from interface: TraceContext
        Trace contexts can be nested. This method returns whether this is the root context.
        Specified by:
        isRootContext in interface TraceContext
        Returns:
        whether this is the root context
      • setExitThrowable

        public void setExitThrowable​(Throwable exitThrowable)
        Description copied from interface: TraceContext
        Setting a throwable indicates that the trace context hasn't exited regularly. As a consequence, durations can't necessarily be compared to other traces.
        Specified by:
        setExitThrowable in interface TraceContext
        Parameters:
        exitThrowable - the throwable that exited the trace
      • startTrace

        public ActiveTrace startTrace​(String label,
                                      Object... labelFormatArgs)
        Description copied from interface: TraceContext
        Starts a new sub-trace within this trace context. Ends the currently active trace of this trace context, if there is one.

        v *

        Specified by:
        startTrace in interface TraceContext
        Parameters:
        label - the label to use for this trace; may contain placeholders
        labelFormatArgs - the format arguments for the placeholders in the label
        Returns:
        an ActiveTrace that can be used in a try-with-resource
      • getActiveTrace

        public ActiveTrace getActiveTrace()
        Description copied from interface: TraceContext
        Returns the deepest currently active trace of the current context or a no-op dummy if none is available.
        Specified by:
        getActiveTrace in interface TraceContext
        Returns:
        the deepest currently active trace of the current context or a no-op dummy if none is available.