-
@JsonClass(generateAdapter = true) public final class SpanA span represents a single unit of work done in the app. It can be a network request, a database query, a view transition, etc. It has a start time, an end time, and attributes that describe it.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public enumSpan.StatusThe status of the span. Can be one of 'Unset', 'Error', or 'Ok'
Values: UNSET,ERROR,OK
-
Field Summary
Fields Modifier and Type Field Description private final StringtraceIdprivate final StringspanIdprivate final StringparentSpanIdprivate final Stringnameprivate final LongstartTimeNanosprivate final LongendTimeNanosprivate final Span.Statusstatusprivate final List<SpanEvent>eventsprivate final List<Attribute>attributesprivate final List<Link>links
-
Method Summary
Modifier and Type Method Description final StringgetTraceId()final StringgetSpanId()final StringgetParentSpanId()final StringgetName()final LonggetStartTimeNanos()final LonggetEndTimeNanos()final Span.StatusgetStatus()final List<SpanEvent>getEvents()final List<Attribute>getAttributes()final List<Link>getLinks()-
-
Constructor Detail
-
Span
Span(String traceId, String spanId, String parentSpanId, String name, Long startTimeNanos, Long endTimeNanos, Span.Status status, List<SpanEvent> events, List<Attribute> attributes, List<Link> links)
- Parameters:
traceId- The ID of the trace that this span is part ofspanId- A value that uniquely identifies a span instanceparentSpanId- A value that uniquely identifies the parent spanname- The name of the spanstartTimeNanos- The time the span started, in nanoseconds since the Unix epochendTimeNanos- The time the span ended, in nanoseconds since the Unix epochstatus- The status of the span.
-
-
Method Detail
-
getTraceId
final String getTraceId()
-
getParentSpanId
final String getParentSpanId()
-
getStartTimeNanos
final Long getStartTimeNanos()
-
getEndTimeNanos
final Long getEndTimeNanos()
-
getStatus
final Span.Status getStatus()
-
getAttributes
final List<Attribute> getAttributes()
-
-
-
-