public class TestSpan extends Object implements io.opentracing.Span
Constructor and Description |
---|
TestSpan()
Create blank span.
|
TestSpan(String operationName,
Map<String,Object> tags,
List<Map<String,?>> logEntries)
Create span with a particular kind and operation name.
|
Modifier and Type | Method and Description |
---|---|
io.opentracing.SpanContext |
context() |
boolean |
equals(Object obj) |
void |
finish() |
void |
finish(long newFinishMicros) |
String |
getBaggageItem(String key) |
String |
getCachedOperationName()
Get the operation name of the span.
|
long |
getFinishMicros()
End time of the span.
|
List<Map<String,?>> |
getLogEntries()
Return a list of log entries.
|
long |
getParentId()
Get the Parent ID of the span.
|
long |
getSpanId()
Get the Span ID.
|
long |
getStartMicros()
Start time of the span.
|
Map<String,Object> |
getTags()
Return a map of tags.
|
long |
getTraceId()
Get the trace ID of the span.
|
int |
hashCode() |
io.opentracing.Span |
log(long timestampMicroseconds,
Map<String,?> fields) |
io.opentracing.Span |
log(long timestampMicroseconds,
String event) |
io.opentracing.Span |
log(Map<String,?> fields) |
io.opentracing.Span |
log(String event) |
io.opentracing.Span |
setBaggageItem(String key,
String value) |
void |
setCachedOperationName(String newCachedOperationName)
Set the operation name of the span.
|
void |
setFinishMicros(long newFinishMicros)
Set the finish time of the span.
|
void |
setLogEntries(List<Map<String,?>> newLogEntries)
Set the list of log entries
|
io.opentracing.Span |
setOperationName(String operationName) |
void |
setParentId(long newParentId)
Set the parent ID of the span.
|
void |
setSpanId(long newSpanId)
Set the span ID.
|
void |
setStartMicros(long newSartMicros)
Set the start time of the span.
|
io.opentracing.Span |
setTag(String key,
boolean value) |
io.opentracing.Span |
setTag(String key,
Number value) |
io.opentracing.Span |
setTag(String key,
String value) |
<T> io.opentracing.Span |
setTag(io.opentracing.tag.Tag<T> tag,
T value) |
void |
setTags(Map<String,Object> newTags)
Set the map of tags.
|
void |
setTraceId(long newTraceId)
Set the trace ID of the span.
|
String |
toString() |
public long getStartMicros()
public void setStartMicros(long newSartMicros)
newSartMicros
- the startMicros to setpublic long getFinishMicros()
public void setFinishMicros(long newFinishMicros)
newFinishMicros
- the finishMicros to setpublic long getTraceId()
public void setTraceId(long newTraceId)
newTraceId
- the traceId to setpublic long getParentId()
public void setParentId(long newParentId)
newParentId
- the parentId to setpublic long getSpanId()
public void setSpanId(long newSpanId)
newSpanId
- the spanId to setpublic String getCachedOperationName()
public void setCachedOperationName(String newCachedOperationName)
newCachedOperationName
- the operationName to setpublic void setTags(Map<String,Object> newTags)
newTags
- the tags to setpublic List<Map<String,?>> getLogEntries()
public void setLogEntries(List<Map<String,?>> newLogEntries)
newLogEntries
- the log entries to setpublic io.opentracing.SpanContext context()
context
in interface io.opentracing.Span
public io.opentracing.Span setTag(String key, String value)
setTag
in interface io.opentracing.Span
public io.opentracing.Span setTag(String key, boolean value)
setTag
in interface io.opentracing.Span
public io.opentracing.Span setTag(String key, Number value)
setTag
in interface io.opentracing.Span
public <T> io.opentracing.Span setTag(io.opentracing.tag.Tag<T> tag, T value)
setTag
in interface io.opentracing.Span
public io.opentracing.Span log(Map<String,?> fields)
log
in interface io.opentracing.Span
public io.opentracing.Span log(long timestampMicroseconds, Map<String,?> fields)
log
in interface io.opentracing.Span
public io.opentracing.Span log(String event)
log
in interface io.opentracing.Span
public io.opentracing.Span log(long timestampMicroseconds, String event)
log
in interface io.opentracing.Span
public io.opentracing.Span setBaggageItem(String key, String value)
setBaggageItem
in interface io.opentracing.Span
public String getBaggageItem(String key)
getBaggageItem
in interface io.opentracing.Span
public io.opentracing.Span setOperationName(String operationName)
setOperationName
in interface io.opentracing.Span
public void finish()
finish
in interface io.opentracing.Span
public void finish(long newFinishMicros)
finish
in interface io.opentracing.Span
Copyright © 2017 – 2021 Eclipse Foundation. All rights reserved.
Use is subject to license terms.