Class SpanManager.Span
java.lang.Object
com.loomcache.server.tracing.SpanManager.Span
- Enclosing class:
SpanManager
Span record containing all span information.
- Since:
- 1.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal SpanManager.SpanKindfinal Stringfinal @Nullable Stringfinal Stringfinal longfinal String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd an event to this span.voidAdd an event with attributes to this span.Get a copy of attributes.doubleGet the duration of this span in milliseconds.longGet the duration of this span in nanoseconds.Get a copy of events.booleanisEnded()Check if span is ended.voidsetAttribute(String key, Object value) Add an attribute to this span.
-
Field Details
-
traceId
-
spanId
-
parentSpanId
-
operationName
-
kind
-
startNanos
public final long startNanos
-
-
Constructor Details
-
Span
public Span(String traceId, String spanId, @Nullable String parentSpanId, String operationName, SpanManager.SpanKind kind, long startNanos)
-
-
Method Details
-
setAttribute
-
addEvent
Add an event to this span. -
addEvent
-
getDurationNanos
public long getDurationNanos()Get the duration of this span in nanoseconds. -
getDurationMs
public double getDurationMs()Get the duration of this span in milliseconds. -
getAttributes
-
getEvents
Get a copy of events. -
isEnded
public boolean isEnded()Check if span is ended.
-