Class SpanData
java.lang.Object
io.opencensus.trace.export.SpanData
- Direct Known Subclasses:
AutoValue_SpanData
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA set of attributes and the number of dropped attributes representation.static classA list of links and the number of dropped links representation.static classA timed event representation.static classA list of timed events and the number of dropped events representation. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic SpanDatacreate(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.static SpanDatacreate(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 immutableSpanData.abstract SpanData.TimedEvents<Annotation> Returns the annotations recorded for thisSpan.abstract SpanData.AttributesReturns the attributes recorded for thisSpan.abstract IntegerReturns the number of child spans that were generated while theSpanwas running.abstract SpanContextReturns theSpanContextassociated with thisSpan.abstract TimestampReturns the endTimestampornullif theSpanis still active.abstract BooleanReturnstrueif the parent is on a different process.abstract Span.KindgetKind()Returns the kind of thisSpan.abstract SpanData.LinksgetLinks()Returns links recorded for thisSpan.abstract SpanData.TimedEvents<MessageEvent> Returns message events recorded for thisSpan.abstract StringgetName()Returns the name of thisSpan.Deprecated.UsegetMessageEvents().abstract SpanIdReturns the parentSpanIdornullif theSpanis a rootSpan.abstract TimestampReturns the startTimestampof thisSpan.abstract StatusReturns theStatusornullifSpanis still active.
-
Constructor Details
-
SpanData
SpanData()
-
-
Method Details
-
create
@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) Deprecated.Returns a new immutableSpanData. -
create
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) Returns a new immutableSpanData.- Parameters:
context- theSpanContextof theSpan.parentSpanId- the parentSpanIdof theSpan.nullif theSpanis a root.hasRemoteParent-trueif the parentSpanis remote.nullif this is a root span.name- the name of theSpan.kind- the kind of theSpan.startTimestamp- the startTimestampof theSpan.attributes- the attributes associated with theSpan.annotations- the annotations associated with theSpan.messageOrNetworkEvents- the message events (or network events for backward compatibility) associated with theSpan.links- the links associated with theSpan.childSpanCount- the number of child spans that were generated while the span was active.status- theStatusof theSpan.nullif theSpanis still active.endTimestamp- the endTimestampof theSpan.nullif theSpanis still active.- Returns:
- a new immutable
SpanData. - Since:
- 0.14
-
getContext
Returns theSpanContextassociated with thisSpan.- Returns:
- the
SpanContextassociated with thisSpan. - Since:
- 0.5
-
getParentSpanId
-
getHasRemoteParent
-
getName
Returns the name of thisSpan.- Returns:
- the name of this
Span. - Since:
- 0.5
-
getKind
-
getStartTimestamp
Returns the startTimestampof thisSpan.- Returns:
- the start
Timestampof thisSpan. - Since:
- 0.5
-
getAttributes
Returns the attributes recorded for thisSpan.- Returns:
- the attributes recorded for this
Span. - Since:
- 0.5
-
getAnnotations
Returns the annotations recorded for thisSpan.- Returns:
- the annotations recorded for this
Span. - Since:
- 0.5
-
getNetworkEvents
Deprecated.UsegetMessageEvents().Returns network events recorded for thisSpan.- Returns:
- network events recorded for this
Span. - Since:
- 0.5
-
getMessageEvents
Returns message events recorded for thisSpan.- Returns:
- message events recorded for this
Span. - Since:
- 0.12
-
getLinks
Returns links recorded for thisSpan.- Returns:
- links recorded for this
Span. - Since:
- 0.5
-
getChildSpanCount
Returns the number of child spans that were generated while theSpanwas running. If notnullallows service implementations to detect missing child spans.This information is not always available.
- Returns:
- the number of child spans that were generated while the
Spanwas running. - Since:
- 0.5
-
getStatus
-
getEndTimestamp
-
create(SpanContext, SpanId, Boolean, String, Kind, Timestamp, Attributes, TimedEvents, TimedEvents, Links, Integer, Status, Timestamp).