org.apache.accumulo.cloudtrace.instrument
Class Trace

java.lang.Object
  extended by org.apache.accumulo.cloudtrace.instrument.Trace

public class Trace
extends Object

A Trace allows a user to gather global, distributed, detailed performance information while requesting a service. The general usage for a user is to do something like this: Trace.on("doSomething"); try { doSomething(); } finally { Trace.off(); } This updates the environment for this thread, and data collection will occur whenever the thread encounters any Span notations in the code. The information about the trace will also be carried over RPC calls as well. If the thread should hand off work to another thread, the environment can be carried with it, so that the trace continues on the new thread.


Constructor Summary
Trace()
           
 
Method Summary
static Span currentTrace()
           
static void endThread(Span span)
           
static boolean isTracing()
           
static void off()
           
static void offNoFlush()
           
static Span on(String description)
           
static Span start(String description)
           
static Span startThread(Span parent, String description)
           
static Span trace(TInfo info, String description)
           
static Runnable wrap(Runnable runnable)
           
static
<T> T
wrapAll(T instance)
           
static
<T> T
wrapAll(T instance, Sampler dist)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Trace

public Trace()
Method Detail

on

public static Span on(String description)

off

public static void off()

offNoFlush

public static void offNoFlush()

isTracing

public static boolean isTracing()

currentTrace

public static Span currentTrace()

start

public static Span start(String description)

trace

public static Span trace(TInfo info,
                         String description)

startThread

public static Span startThread(Span parent,
                               String description)

endThread

public static void endThread(Span span)

wrap

public static Runnable wrap(Runnable runnable)

wrapAll

public static <T> T wrapAll(T instance)

wrapAll

public static <T> T wrapAll(T instance,
                            Sampler dist)


Copyright © 2012 The Apache Software Foundation. All Rights Reserved.