public interface Tracer
| Modifier and Type | Interface and Description |
|---|---|
static interface |
Tracer.HeaderAccessor
A functional interface to access a header value.
|
static interface |
Tracer.HeaderMutator
A functional interface to set a header.
|
| Modifier and Type | Field and Description |
|---|---|
static String |
SPAN_ID |
static String |
TRACE_ID |
| Modifier and Type | Method and Description |
|---|---|
void |
closeCurrentSpan()
Finish the current span and restore the current span's parent as the current span
|
void |
closeSpan(SpanBuilder current)
Finish the supplied span and restore the supplied span's parent as the current span.
|
SpanBuilder |
createSpan()
Create a span which is a child of the current span.
|
<T> T |
executeCallable(String resource,
String operation,
Callable<T> callable)
Execute a Callable with reporting
|
void |
executeRunnable(String resource,
String operation,
Runnable runnable)
Execute a Runnable with reporting
|
void |
exportSpan(String resource,
String operation,
Tracer.HeaderMutator headerAccessor)
Export a span to another process using headers.
|
SpanBuilder |
getCurrentSpan()
Get the currently active span
|
SpanBuilder |
importSpan(Tracer.HeaderAccessor headerAccessor)
Import a span across process boundaries using a set of headers.
|
static final String SPAN_ID
static final String TRACE_ID
<T> T executeCallable(String resource, String operation, Callable<T> callable)
resource - The resource being calledoperation - The operation being calledcallable - The Callable to invokevoid executeRunnable(String resource, String operation, Runnable runnable)
resource - The resource being calledoperation - The operation being calledrunnable - The runnable to invokeSpanBuilder getCurrentSpan()
SpanBuilder importSpan(Tracer.HeaderAccessor headerAccessor)
headerAccessor - The function access to headers. Function supplied with header name and
should return the header value.void exportSpan(String resource, String operation, Tracer.HeaderMutator headerAccessor)
resource - The remote resource being invokedoperation - The remote operation being invokedheaderAccessor - The function access to headers. Function supplied with header name and
value.SpanBuilder createSpan()
void closeCurrentSpan()
void closeSpan(SpanBuilder current)
current - The currently active spanCopyright © 2017. All rights reserved.