Package io.opentelemetry.sdk.trace.data
Interface LinkData
- All Known Implementing Classes:
AutoValue_ImmutableLinkData
,ImmutableLinkData
@Immutable
public interface LinkData
Data representation of a link.
Used (for example) in batching operations, where a single batch handler processes multiple requests from different traces. Link can be also used to reference spans from the same trace.
-
Method Summary
Modifier and TypeMethodDescriptionstatic LinkData
create
(SpanContext spanContext) Returns a new immutableLinkData
.static LinkData
create
(SpanContext spanContext, Attributes attributes) Returns a new immutableLinkData
.static LinkData
create
(SpanContext spanContext, Attributes attributes, int totalAttributeCount) Returns a new immutableLinkData
.Returns the set of attributes.Returns theSpanContext
of the span thisLinkData
refers to.int
The total number of attributes that were recorded on this Link.
-
Method Details
-
create
Returns a new immutableLinkData
.- Parameters:
spanContext
- theSpanContext
of thisLinkData
.- Returns:
- a new immutable
LinkData
-
create
Returns a new immutableLinkData
.- Parameters:
spanContext
- theSpanContext
of thisLinkData
.attributes
- the attributes of thisLinkData
.- Returns:
- a new immutable
LinkData
-
create
Returns a new immutableLinkData
.- Parameters:
spanContext
- theSpanContext
of thisLinkData
.attributes
- the attributes of thisLinkData
.totalAttributeCount
- the total number of attributed for thisLinkData
.- Returns:
- a new immutable
LinkData
-
getSpanContext
SpanContext getSpanContext()Returns theSpanContext
of the span thisLinkData
refers to. -
getAttributes
Attributes getAttributes()Returns the set of attributes.- Returns:
- the set of attributes.
-
getTotalAttributeCount
int getTotalAttributeCount()The total number of attributes that were recorded on this Link. This number may be larger than the number of attributes that are attached to this span, if the total number recorded was greater than the configured maximum value. See:SpanLimits.getMaxNumberOfAttributesPerLink()
- Returns:
- The number of attributes on this link.
-