public interface Span
| Modifier and Type | Interface and Description |
|---|---|
static class |
Span.SpanSerializer |
| Modifier and Type | Method and Description |
|---|---|
void |
addKVAnnotation(String key,
String value)
Add a data annotation associated with this span
|
void |
addTimelineAnnotation(String msg)
Add a timeline annotation associated with this span
|
Span |
child(String description)
Deprecated.
Since 4.0.0. Use
MilliSpan.Builder |
long |
getAccumulatedMillis()
Return the total amount of time elapsed since start was called, if running,
or difference between stop and start
|
String |
getDescription()
Return a textual description of this span.
Will never be null.
|
Map<String,String> |
getKVAnnotations()
Get data associated with this span (read only)
Will never be null.
|
SpanId[] |
getParents()
Returns the parent IDs of the span.
The array will be empty if there are no parents.
|
SpanId |
getSpanId()
A pseudo-unique (random) number assigned to this span instance.
The spanId is immutable and cannot be changed.
|
long |
getStartTimeMillis()
Get the start time, in milliseconds
|
long |
getStopTimeMillis()
Get the stop time, in milliseconds
|
List<TimelineAnnotation> |
getTimelineAnnotations()
Get any timeline annotations (read only)
Will never be null.
|
String |
getTracerId()
Return a unique id for the process from which this Span originated.
Will never be null.
|
boolean |
isRunning()
Has the span been started and not yet stopped?
|
void |
setParents(SpanId[] parents)
Set the parents of this span.
Any existing parents will be cleared by this call.
|
void |
setTracerId(String s)
Set the process id of a span.
|
void |
stop()
The block has completed, stop the clock
|
String |
toJson()
Serialize to Json
|
String |
toString() |
void stop()
long getStartTimeMillis()
long getStopTimeMillis()
long getAccumulatedMillis()
boolean isRunning()
String getDescription()
SpanId getSpanId()
@Deprecated Span child(String description)
MilliSpan.BuilderSpanId[] getParents()
void setParents(SpanId[] parents)
void addKVAnnotation(String key, String value)
void addTimelineAnnotation(String msg)
Map<String,String> getKVAnnotations()
List<TimelineAnnotation> getTimelineAnnotations()
String getTracerId()
void setTracerId(String s)
String toJson()
Copyright © 2016 The Apache Software Foundation. All Rights Reserved.