@Immutable public abstract class SpanData extends Object
Span class.| Modifier and Type | Class and Description |
|---|---|
static class |
SpanData.TimedEvent
A timed event representation.
|
static class |
SpanData.Timestamp
A representation of an instant in time.
|
| Modifier and Type | Method and Description |
|---|---|
static SpanData |
create(SpanContext context,
SpanId parentSpanId,
Resource resource,
String name,
Span.Kind kind,
SpanData.Timestamp startTimestamp,
Map<String,AttributeValue> attributes,
List<SpanData.TimedEvent> timedEvents,
List<Link> links,
Status status,
SpanData.Timestamp endTimestamp)
Returns a new immutable
SpanData. |
abstract Map<String,AttributeValue> |
getAttributes()
Returns the attributes recorded for this
Span. |
abstract SpanContext |
getContext()
Returns the
SpanContext associated with this Span. |
abstract SpanData.Timestamp |
getEndTimestamp()
Returns the end
Timestamp. |
abstract Span.Kind |
getKind()
Returns the kind of this
Span. |
abstract List<Link> |
getLinks()
Returns links recorded for this
Span. |
abstract String |
getName()
Returns the name of this
Span. |
abstract SpanId |
getParentSpanId()
Returns the parent
SpanId or null if the Span is a root Span. |
abstract Resource |
getResource()
Returns the resource of this
Span. |
abstract SpanData.Timestamp |
getStartTimestamp()
Returns the start
Timestamp of this Span. |
abstract Status |
getStatus()
Returns the
Status. |
abstract List<SpanData.TimedEvent> |
getTimedEvents()
Returns the timed events recorded for this
Span. |
public static SpanData create(SpanContext context, @Nullable SpanId parentSpanId, Resource resource, String name, Span.Kind kind, SpanData.Timestamp startTimestamp, Map<String,AttributeValue> attributes, List<SpanData.TimedEvent> timedEvents, List<Link> links, Status status, SpanData.Timestamp endTimestamp)
SpanData.context - the SpanContext of the Span.parentSpanId - the parent SpanId of the Span. null if the Span is a root.resource - the resource this span was executed on.name - the name of the Span.kind - the kind of the Span.startTimestamp - the start Timestamp of the Span.attributes - the attributes associated with the Span.timedEvents - the events associated with the Span.links - the links associated with the Span.status - the Status of the Span.endTimestamp - the end Timestamp of the Span.SpanData.public abstract SpanContext getContext()
SpanContext associated with this Span.SpanContext associated with this Span.@Nullable public abstract SpanId getParentSpanId()
SpanId or null if the Span is a root Span.SpanId or null if the Span is a root Span.public abstract Resource getResource()
Span.Span.public abstract String getName()
Span.Span.public abstract Span.Kind getKind()
Span.Span.public abstract SpanData.Timestamp getStartTimestamp()
Timestamp of this Span.Timestamp of this Span.public abstract Map<String,AttributeValue> getAttributes()
Span.Span.public abstract List<SpanData.TimedEvent> getTimedEvents()
Span.Span.public abstract List<Link> getLinks()
Span.Span.public abstract Status getStatus()
Status.Status.public abstract SpanData.Timestamp getEndTimestamp()
Timestamp.Timestamp.