org.apache.accumulo.trace.instrument
Class Trace
java.lang.Object
org.apache.accumulo.trace.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()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Trace
public Trace()
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 © 2013 Apache Accumulo Project. All Rights Reserved.