Class TestSpan
java.lang.Object
org.eclipse.microprofile.opentracing.tck.tracer.TestSpan
- All Implemented Interfaces:
io.opentracing.Span
Test Tracer.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionio.opentracing.SpanContextcontext()booleanvoidfinish()voidfinish(long newFinishMicros) getBaggageItem(String key) Get the operation name of the span.longEnd time of the span.Return a list of log entries.longGet the Parent ID of the span.longGet the Span ID.longStart time of the span.getTags()Return a map of tags.longGet the trace ID of the span.inthashCode()io.opentracing.Spanio.opentracing.Spanio.opentracing.Spanio.opentracing.Spanio.opentracing.SpansetBaggageItem(String key, String value) voidsetCachedOperationName(String newCachedOperationName) Set the operation name of the span.voidsetFinishMicros(long newFinishMicros) Set the finish time of the span.voidsetLogEntries(List<Map<String, ?>> newLogEntries) Set the list of log entriesio.opentracing.SpansetOperationName(String operationName) voidsetParentId(long newParentId) Set the parent ID of the span.voidsetSpanId(long newSpanId) Set the span ID.voidsetStartMicros(long newSartMicros) Set the start time of the span.<T> io.opentracing.SpansetTag(io.opentracing.tag.Tag<T> tag, T value) io.opentracing.Spanio.opentracing.Spanio.opentracing.SpanvoidSet the map of tags.voidsetTraceId(long newTraceId) Set the trace ID of the span.toString()
-
Constructor Details
-
TestSpan
public TestSpan()Create blank span. -
TestSpan
Create span with a particular kind and operation name.- Parameters:
operationName- Operation nametags- Tags associated with spanlogEntries- Log entries
-
-
Method Details
-
getStartMicros
public long getStartMicros()Start time of the span.- Returns:
- the startMicros
-
setStartMicros
public void setStartMicros(long newSartMicros) Set the start time of the span.- Parameters:
newSartMicros- the startMicros to set
-
getFinishMicros
public long getFinishMicros()End time of the span.- Returns:
- the finishMicros
-
setFinishMicros
public void setFinishMicros(long newFinishMicros) Set the finish time of the span.- Parameters:
newFinishMicros- the finishMicros to set
-
getTraceId
public long getTraceId()Get the trace ID of the span.- Returns:
- the traceId
-
setTraceId
public void setTraceId(long newTraceId) Set the trace ID of the span.- Parameters:
newTraceId- the traceId to set
-
getParentId
public long getParentId()Get the Parent ID of the span.- Returns:
- the parentId
-
setParentId
public void setParentId(long newParentId) Set the parent ID of the span.- Parameters:
newParentId- the parentId to set
-
getSpanId
public long getSpanId()Get the Span ID.- Returns:
- the spanId
-
setSpanId
public void setSpanId(long newSpanId) Set the span ID.- Parameters:
newSpanId- the spanId to set
-
getCachedOperationName
Get the operation name of the span.- Returns:
- the operationName
-
setCachedOperationName
Set the operation name of the span.- Parameters:
newCachedOperationName- the operationName to set
-
getTags
Return a map of tags.- Returns:
- the tags
-
setTags
Set the map of tags.- Parameters:
newTags- the tags to set
-
getLogEntries
Return a list of log entries.- Returns:
- the log entries
-
setLogEntries
Set the list of log entries- Parameters:
newLogEntries- the log entries to set
-
context
public io.opentracing.SpanContext context()- Specified by:
contextin interfaceio.opentracing.Span
-
setTag
- Specified by:
setTagin interfaceio.opentracing.Span
-
setTag
- Specified by:
setTagin interfaceio.opentracing.Span
-
setTag
- Specified by:
setTagin interfaceio.opentracing.Span
-
setTag
public <T> io.opentracing.Span setTag(io.opentracing.tag.Tag<T> tag, T value) - Specified by:
setTagin interfaceio.opentracing.Span
-
log
- Specified by:
login interfaceio.opentracing.Span
-
log
- Specified by:
login interfaceio.opentracing.Span
-
log
- Specified by:
login interfaceio.opentracing.Span
-
log
- Specified by:
login interfaceio.opentracing.Span
-
setBaggageItem
- Specified by:
setBaggageItemin interfaceio.opentracing.Span
-
getBaggageItem
- Specified by:
getBaggageItemin interfaceio.opentracing.Span
-
setOperationName
- Specified by:
setOperationNamein interfaceio.opentracing.Span
-
finish
public void finish()- Specified by:
finishin interfaceio.opentracing.Span
-
finish
public void finish(long newFinishMicros) - Specified by:
finishin interfaceio.opentracing.Span
-
toString
-
equals
-
hashCode
public int hashCode()
-