public class HTraceTracerContext extends Object implements TracerContext
| Constructor and Description |
|---|
HTraceTracerContext(Tracer tracer) |
HTraceTracerContext(Tracer tracer,
TraceScope continuationScope) |
| 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.
|
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 description,
Traceable<T> traceable)
Wraps the traceable into a new span, preserving the current span as a parent.
|
public HTraceTracerContext(Tracer tracer)
public HTraceTracerContext(Tracer tracer,
TraceScope continuationScope)
public 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 description, Traceable<T> traceable)
TracerContextwrap in interface TracerContextdescription - 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