@Immutable public abstract class SpanData extends Object
Span
class.Modifier and Type | Class and Description |
---|---|
static class |
SpanData.Attributes
A set of attributes and the number of dropped attributes representation.
|
static class |
SpanData.Links
A list of links and the number of dropped links representation.
|
static class |
SpanData.TimedEvent<T>
A timed event representation.
|
static class |
SpanData.TimedEvents<T>
A list of timed events and the number of dropped events representation.
|
Modifier and Type | Method and Description |
---|---|
static SpanData |
create(SpanContext context,
SpanId parentSpanId,
Boolean hasRemoteParent,
String name,
Span.Kind kind,
Timestamp startTimestamp,
SpanData.Attributes attributes,
SpanData.TimedEvents<Annotation> annotations,
SpanData.TimedEvents<? extends BaseMessageEvent> messageOrNetworkEvents,
SpanData.Links links,
Integer childSpanCount,
Status status,
Timestamp endTimestamp)
Returns a new immutable
SpanData . |
static SpanData |
create(SpanContext context,
SpanId parentSpanId,
Boolean hasRemoteParent,
String name,
Timestamp startTimestamp,
SpanData.Attributes attributes,
SpanData.TimedEvents<Annotation> annotations,
SpanData.TimedEvents<? extends BaseMessageEvent> messageOrNetworkEvents,
SpanData.Links links,
Integer childSpanCount,
Status status,
Timestamp endTimestamp)
Deprecated.
Use
#create(SpanContext, SpanId, Boolean, String, Kind, Timestamp,
Attributes, TimedEvents, TimedEvents, Links, Integer, Status, Timestamp) . |
abstract SpanData.TimedEvents<Annotation> |
getAnnotations()
Returns the annotations recorded for this
Span . |
abstract SpanData.Attributes |
getAttributes()
Returns the attributes recorded for this
Span . |
abstract Integer |
getChildSpanCount()
Returns the number of child spans that were generated while the
Span was running. |
abstract SpanContext |
getContext()
Returns the
SpanContext associated with this Span . |
abstract Timestamp |
getEndTimestamp()
Returns the end
Timestamp or null if the Span is still active. |
abstract Boolean |
getHasRemoteParent()
Returns
true if the parent is on a different process. |
abstract Span.Kind |
getKind()
Returns the kind of this
Span . |
abstract SpanData.Links |
getLinks()
Returns links recorded for this
Span . |
abstract SpanData.TimedEvents<MessageEvent> |
getMessageEvents()
Returns message events recorded for this
Span . |
abstract String |
getName()
Returns the name of this
Span . |
SpanData.TimedEvents<NetworkEvent> |
getNetworkEvents()
Deprecated.
Use
getMessageEvents() . |
abstract SpanId |
getParentSpanId()
Returns the parent
SpanId or null if the Span is a root Span . |
abstract Timestamp |
getStartTimestamp()
Returns the start
Timestamp of this Span . |
abstract Status |
getStatus()
Returns the
Status or null if Span is still active. |
@Deprecated public static SpanData create(SpanContext context, @Nullable SpanId parentSpanId, @Nullable Boolean hasRemoteParent, String name, Timestamp startTimestamp, SpanData.Attributes attributes, SpanData.TimedEvents<Annotation> annotations, SpanData.TimedEvents<? extends BaseMessageEvent> messageOrNetworkEvents, SpanData.Links links, @Nullable Integer childSpanCount, @Nullable Status status, @Nullable Timestamp endTimestamp)
#create(SpanContext, SpanId, Boolean, String, Kind, Timestamp,
Attributes, TimedEvents, TimedEvents, Links, Integer, Status, Timestamp)
.SpanData
.public static SpanData create(SpanContext context, @Nullable SpanId parentSpanId, @Nullable Boolean hasRemoteParent, String name, @Nullable Span.Kind kind, Timestamp startTimestamp, SpanData.Attributes attributes, SpanData.TimedEvents<Annotation> annotations, SpanData.TimedEvents<? extends BaseMessageEvent> messageOrNetworkEvents, SpanData.Links links, @Nullable Integer childSpanCount, @Nullable Status status, @Nullable Timestamp endTimestamp)
SpanData
.context
- the SpanContext
of the Span
.parentSpanId
- the parent SpanId
of the Span
. null
if the Span
is a root.hasRemoteParent
- true
if the parent Span
is remote. null
if this
is a root span.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
.annotations
- the annotations associated with the Span
.messageOrNetworkEvents
- the message events (or network events for backward compatibility)
associated with the Span
.links
- the links associated with the Span
.childSpanCount
- the number of child spans that were generated while the span was active.status
- the Status
of the Span
. null
if the Span
is still
active.endTimestamp
- the end Timestamp
of the Span
. null
if the Span
is still active.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
.@Nullable public abstract Boolean getHasRemoteParent()
true
if the parent is on a different process. null
if this is a root
span.true
if the parent is on a different process. null
if this is a root
span.public abstract String getName()
Span
.Span
.@Nullable public abstract Span.Kind getKind()
Span
.Span
.public abstract Timestamp getStartTimestamp()
Timestamp
of this Span
.Timestamp
of this Span
.public abstract SpanData.Attributes getAttributes()
Span
.Span
.public abstract SpanData.TimedEvents<Annotation> getAnnotations()
Span
.Span
.@Deprecated public SpanData.TimedEvents<NetworkEvent> getNetworkEvents()
getMessageEvents()
.Span
.Span
.public abstract SpanData.TimedEvents<MessageEvent> getMessageEvents()
Span
.Span
.public abstract SpanData.Links getLinks()
Span
.Span
.@Nullable public abstract Integer getChildSpanCount()
Span
was running. If
not null
allows service implementations to detect missing child spans.
This information is not always available.
Span
was running.@Nullable public abstract Status getStatus()
Status
or null
if Span
is still active.Status
or null
if Span
is still active.