Class Trace


  • public class Trace
    extends Object
    Utility class for tracing within Accumulo. Not intended for client use!
    • Constructor Summary

      Constructors 
      Constructor Description
      Trace()  
    • Constructor Detail

      • Trace

        public Trace()
    • Method Detail

      • on

        public static Span on​(String description)
        Start a trace span with a given description.
      • on

        public static <T> Span on​(String description,
                                  org.apache.htrace.Sampler<T> sampler)
        Start a trace span with a given description with the given sampler.
      • off

        public static void off()
        Finish the current trace.
      • offNoFlush

        @Deprecated
        public static void offNoFlush()
        Deprecated.
        since 1.7, use off() instead
      • isTracing

        public static boolean isTracing()
        Returns whether tracing is currently on.
      • currentTrace

        @Deprecated
        public static Span currentTrace()
        Deprecated.
        since 1.7 -- it is better to save the span you create in a local variable and call its methods, rather than retrieving the current span
        Return the current span.
      • currentTraceId

        public static long currentTraceId()
        Get the trace id of the current span.
      • start

        public static Span start​(String description)
        Start a new span with a given name, if already tracing.
      • trace

        public static Span trace​(TInfo info,
                                 String description)
        Continue a trace by starting a new span with a given parent and description.
      • data

        public static void data​(String k,
                                String v)
        Add data to the current span.
      • wrap

        public static Runnable wrap​(Runnable runnable)
        Wrap a runnable in a TraceRunnable, if tracing.
      • wrapAll

        public static <T> T wrapAll​(T instance)
      • wrapAll

        public static <T,​V> T wrapAll​(T instance,
                                            org.apache.htrace.Sampler<V> dist)