public class HTraceTracerContext extends Object implements TracerContext
| Constructor and Description |
|---|
HTraceTracerContext(org.apache.htrace.Sampler<?> sampler) |
HTraceTracerContext(org.apache.htrace.Sampler<?> sampler,
org.apache.htrace.Span continuationSpan) |
| Modifier and Type | Method and Description |
|---|---|
void |
annotate(String key,
String value)
Adds a key/value pair to the currently active span.
|
<T> T |
continueSpan(Traceable<T> traceable)
Picks up an currently detached span from another thread.
|
org.apache.htrace.TraceScope |
startSpan(String description)
Starts a new span in the current thread.
|
void |
timeline(String message)
Adds a timeline to the currently active span.
|
<T> Callable<T> |
wrap(String desription,
Traceable<T> traceable)
Wraps the traceable into a new span, preserving the current span as a parent.
|
public HTraceTracerContext(org.apache.htrace.Sampler<?> sampler)
public HTraceTracerContext(org.apache.htrace.Sampler<?> sampler,
org.apache.htrace.Span continuationSpan)
public org.apache.htrace.TraceScope startSpan(String description)
TracerContextstartSpan in interface TracerContextdescription - span descriptionpublic <T> T continueSpan(Traceable<T> traceable) throws Exception
TracerContextcontinueSpan in interface TracerContexttraceable - traceable implementation to be executedException - any exception being thrown by the traceable implementationpublic <T> Callable<T> wrap(String desription, Traceable<T> traceable)
TracerContextwrap in interface TracerContextdesription - span descriptiontraceable - traceable implementation to be wrappedpublic void annotate(String key, String value)
TracerContextannotate in interface TracerContextkey - key to addvalue - value to addpublic void timeline(String message)
TracerContexttimeline in interface TracerContextmessage - timeline messageApache CXF