Package fish.payara.opentracing.span
Class Span
- java.lang.Object
-
- fish.payara.notification.requesttracing.RequestTraceSpan
-
- fish.payara.opentracing.span.Span
-
- All Implemented Interfaces:
io.opentracing.Span,Serializable,Comparable<RequestTraceSpan>
public class Span extends RequestTraceSpan implements io.opentracing.Span
Implementation of the OpenTracing Span class. These Spans get recorded by the Request Tracing Service.- Author:
- Andrew Pielage
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class fish.payara.notification.requesttracing.RequestTraceSpan
RequestTraceSpan.SpanContextRelationshipType, RequestTraceSpan.SpanReference
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description io.opentracing.SpanContextcontext()voidfinish()voidfinish(long finishMicros)StringgetApplicationName()Returns the name of the application that this Span was created from.StringgetBaggageItem(String key)io.opentracing.Spanlog(long timestampMicroseconds, String logEvent)io.opentracing.Spanlog(long timestampMicroseconds, Map<String,?> map)io.opentracing.Spanlog(String logEvent)io.opentracing.Spanlog(Map<String,?> map)io.opentracing.SpansetBaggageItem(String key, String value)io.opentracing.SpansetOperationName(String operationName)voidsetStartTime(long startTimeMicros)Sets the start time of the Span.<T> io.opentracing.SpansetTag(io.opentracing.tag.Tag<T> tag, T tagValue)io.opentracing.SpansetTag(String tagName, boolean tagValue)io.opentracing.SpansetTag(String tagName, Number tagValue)io.opentracing.SpansetTag(String tagName, String tagValue)-
Methods inherited from class fish.payara.notification.requesttracing.RequestTraceSpan
addSpanLog, addSpanReference, addSpanTag, addSpanTag, compareTo, getEventName, getEventType, getId, getSpanContext, getSpanDuration, getSpanReferences, getSpanTag, getSpanTags, getStartInstant, getTimeOccured, getTraceEndTime, getTraceId, setEventName, setEventType, setSpanDuration, setStartInstant, setTraceEndTime, setTraceId, toString
-
-
-
-
Constructor Detail
-
Span
public Span(String operationName, String applicationName)
Constructor that creates a RequestTraceSpan object and sets the application name that this Span was created from.- Parameters:
operationName- The name of the spanapplicationName- The name of the application that this Span was created from
-
-
Method Detail
-
getApplicationName
public String getApplicationName()
Returns the name of the application that this Span was created from.- Returns:
- The name of the application that this Span was created from.
-
context
public io.opentracing.SpanContext context()
- Specified by:
contextin interfaceio.opentracing.Span
-
setTag
public io.opentracing.Span setTag(String tagName, String tagValue)
- Specified by:
setTagin interfaceio.opentracing.Span
-
setTag
public io.opentracing.Span setTag(String tagName, boolean tagValue)
- Specified by:
setTagin interfaceio.opentracing.Span
-
setTag
public io.opentracing.Span setTag(String tagName, Number tagValue)
- Specified by:
setTagin interfaceio.opentracing.Span
-
setTag
public <T> io.opentracing.Span setTag(io.opentracing.tag.Tag<T> tag, T tagValue)- Specified by:
setTagin interfaceio.opentracing.Span
-
log
public io.opentracing.Span log(Map<String,?> map)
- Specified by:
login interfaceio.opentracing.Span
-
log
public io.opentracing.Span log(long timestampMicroseconds, Map<String,?> map)- Specified by:
login interfaceio.opentracing.Span
-
log
public io.opentracing.Span log(String logEvent)
- Specified by:
login interfaceio.opentracing.Span
-
log
public io.opentracing.Span log(long timestampMicroseconds, String logEvent)- Specified by:
login interfaceio.opentracing.Span
-
setBaggageItem
public io.opentracing.Span setBaggageItem(String key, String value)
- Specified by:
setBaggageItemin interfaceio.opentracing.Span
-
getBaggageItem
public String getBaggageItem(String key)
- Specified by:
getBaggageItemin interfaceio.opentracing.Span
-
setOperationName
public io.opentracing.Span setOperationName(String operationName)
- Specified by:
setOperationNamein interfaceio.opentracing.Span
-
finish
public void finish()
- Specified by:
finishin interfaceio.opentracing.Span
-
finish
public void finish(long finishMicros)
- Specified by:
finishin interfaceio.opentracing.Span
-
setStartTime
public void setStartTime(long startTimeMicros)
Sets the start time of the Span.- Parameters:
startTimeMicros- The start time of the Span in Microseconds
-
-