| Modifier and Type | Class and Description |
|---|---|
static class |
MilliSpan.Builder
The public interface for constructing a MilliSpan.
|
static class |
MilliSpan.MilliSpanDeserializer |
Span.SpanSerializer| Constructor and Description |
|---|
MilliSpan() |
| 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 childDescription)
Create a child span of this span with the given description
|
protected long |
currentTimeMillis() |
static MilliSpan |
fromJson(String json) |
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.
|
Map<String,String> |
getKVAnnotations()
Get the key-value annotations associated with this span.
|
SpanId[] |
getParents()
Returns the parent IDs of the span.
|
SpanId |
getSpanId()
A pseudo-unique (random) number assigned to this span instance.
|
long |
getStartTimeMillis()
Get the span start time.
|
long |
getStopTimeMillis()
Get the span stop time.
|
List<TimelineAnnotation> |
getTimelineAnnotations()
Get the timeline annotation list.
|
String |
getTracerId()
Return a unique id for the process from which this Span originated.
|
boolean |
isRunning()
Has the span been started and not yet stopped?
|
void |
setParents(SpanId[] parents)
Set the parents of this span.
|
void |
setTracerId(String tracerId)
Set the tracer id of a span.
|
void |
stop()
The block has completed, stop the clock
|
String |
toJson()
Serialize to Json
|
String |
toString() |
public Span child(String childDescription)
Spanpublic void stop()
Spanprotected long currentTimeMillis()
public boolean isRunning()
Spanpublic long getAccumulatedMillis()
SpangetAccumulatedMillis in interface Spanpublic String toString()
public String getDescription()
SpangetDescription in interface Spanpublic SpanId getSpanId()
Spanpublic SpanId[] getParents()
SpangetParents in interface Spanpublic void setParents(SpanId[] parents)
SpanAny existing parents will be cleared by this call.
setParents in interface Spanparents - The parents to set.public long getStartTimeMillis()
SpangetStartTimeMillis in interface Spanpublic long getStopTimeMillis()
SpangetStopTimeMillis in interface Spanpublic void addKVAnnotation(String key, String value)
SpanaddKVAnnotation in interface Spankey - The key to set.value - The value to set.public void addTimelineAnnotation(String msg)
SpanaddTimelineAnnotation in interface Spanmsg - The annotation to set. It will be associated with
the current time.public Map<String,String> getKVAnnotations()
SpangetKVAnnotations in interface Spanpublic List<TimelineAnnotation> getTimelineAnnotations()
SpangetTimelineAnnotations in interface Spanpublic String getTracerId()
SpangetTracerId in interface Spanpublic void setTracerId(String tracerId)
SpansetTracerId in interface SpantracerId - The tracer ID to set.public static MilliSpan fromJson(String json) throws IOException
IOExceptionCopyright © 2016 The Apache Software Foundation. All Rights Reserved.