public abstract class LocalTracer extends AnnotationSubmitter
lc=spring-boot.
Here's an example of allocating precise duration for a local span:
tracer.startNewSpan("codec", "encode");
try {
return codec.encode(input);
} finally {
tracer.finishSpan();
}
Constants.LOCAL_COMPONENT| Modifier and Type | Method and Description |
|---|---|
void |
finishSpan()
Completes the span, assigning the most precise duration possible.
|
void |
finishSpan(long duration)
Completes the span, which took
duration microseconds. |
SpanId |
startNewSpan(String component,
String operation)
Request a new local span, which starts now.
|
SpanId |
startNewSpan(String component,
String operation,
long timestamp)
Request a new local span, which started at the given timestamp.
|
create, submitAnnotation, submitAnnotation, submitBinaryAnnotation, submitBinaryAnnotationpublic SpanId startNewSpan(String component, String operation)
component - component responsible for the operationoperation - name of the operation that's begunConstants.LOCAL_COMPONENTpublic SpanId startNewSpan(String component, String operation, long timestamp)
component - component responsible for the operationoperation - name of the operation that's beguntimestamp - time the operation started, in epoch microseconds.Constants.LOCAL_COMPONENTpublic void finishSpan()
public void finishSpan(long duration)
duration microseconds.Copyright © 2016. All rights reserved.