Package io.opentelemetry.proto.trace.v1
Interface Span.LinkOrBuilder
- All Superinterfaces:
com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder
- All Known Implementing Classes:
Span.Link,Span.Link.Builder
- Enclosing class:
- Span
public static interface Span.LinkOrBuilder
extends com.google.protobuf.MessageOrBuilder
-
Method Summary
Modifier and TypeMethodDescriptiongetAttributes(int index) attributes is a collection of attribute key/value pairs on the link.intattributes is a collection of attribute key/value pairs on the link.attributes is a collection of attribute key/value pairs on the link.getAttributesOrBuilder(int index) attributes is a collection of attribute key/value pairs on the link.List<? extends KeyValueOrBuilder>attributes is a collection of attribute key/value pairs on the link.intdropped_attributes_count is the number of dropped attributes.intgetFlags()Flags, a bit field.com.google.protobuf.ByteStringA unique identifier for the linked span.com.google.protobuf.ByteStringA unique identifier of a trace that this linked span is part of.The trace_state associated with the link.com.google.protobuf.ByteStringThe trace_state associated with the link.Methods inherited from interface com.google.protobuf.MessageLiteOrBuilder
isInitializedMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getDefaultInstanceForType, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getTraceId
com.google.protobuf.ByteString getTraceId()A unique identifier of a trace that this linked span is part of. The ID is a 16-byte array.
bytes trace_id = 1;- Returns:
- The traceId.
-
getSpanId
com.google.protobuf.ByteString getSpanId()A unique identifier for the linked span. The ID is an 8-byte array.
bytes span_id = 2;- Returns:
- The spanId.
-
getTraceState
String getTraceState()The trace_state associated with the link.
string trace_state = 3;- Returns:
- The traceState.
-
getTraceStateBytes
com.google.protobuf.ByteString getTraceStateBytes()The trace_state associated with the link.
string trace_state = 3;- Returns:
- The bytes for traceState.
-
getAttributesList
attributes is a collection of attribute key/value pairs on the link. Attribute keys MUST be unique (it is not allowed to have more than one attribute with the same key). The attribute values SHOULD NOT contain empty values. The attribute values SHOULD NOT contain bytes values. The attribute values SHOULD NOT contain array values different than array of string values, bool values, int values, double values. The attribute values SHOULD NOT contain kvlist values. The behavior of software that receives attributes containing such values can be unpredictable. These restrictions can change in a minor release. The restrictions take origin from the OpenTelemetry specification: https://github.com/open-telemetry/opentelemetry-specification/blob/v1.47.0/specification/common/README.md#attribute.
repeated .opentelemetry.proto.common.v1.KeyValue attributes = 4; -
getAttributes
attributes is a collection of attribute key/value pairs on the link. Attribute keys MUST be unique (it is not allowed to have more than one attribute with the same key). The attribute values SHOULD NOT contain empty values. The attribute values SHOULD NOT contain bytes values. The attribute values SHOULD NOT contain array values different than array of string values, bool values, int values, double values. The attribute values SHOULD NOT contain kvlist values. The behavior of software that receives attributes containing such values can be unpredictable. These restrictions can change in a minor release. The restrictions take origin from the OpenTelemetry specification: https://github.com/open-telemetry/opentelemetry-specification/blob/v1.47.0/specification/common/README.md#attribute.
repeated .opentelemetry.proto.common.v1.KeyValue attributes = 4; -
getAttributesCount
int getAttributesCount()attributes is a collection of attribute key/value pairs on the link. Attribute keys MUST be unique (it is not allowed to have more than one attribute with the same key). The attribute values SHOULD NOT contain empty values. The attribute values SHOULD NOT contain bytes values. The attribute values SHOULD NOT contain array values different than array of string values, bool values, int values, double values. The attribute values SHOULD NOT contain kvlist values. The behavior of software that receives attributes containing such values can be unpredictable. These restrictions can change in a minor release. The restrictions take origin from the OpenTelemetry specification: https://github.com/open-telemetry/opentelemetry-specification/blob/v1.47.0/specification/common/README.md#attribute.
repeated .opentelemetry.proto.common.v1.KeyValue attributes = 4; -
getAttributesOrBuilderList
List<? extends KeyValueOrBuilder> getAttributesOrBuilderList()attributes is a collection of attribute key/value pairs on the link. Attribute keys MUST be unique (it is not allowed to have more than one attribute with the same key). The attribute values SHOULD NOT contain empty values. The attribute values SHOULD NOT contain bytes values. The attribute values SHOULD NOT contain array values different than array of string values, bool values, int values, double values. The attribute values SHOULD NOT contain kvlist values. The behavior of software that receives attributes containing such values can be unpredictable. These restrictions can change in a minor release. The restrictions take origin from the OpenTelemetry specification: https://github.com/open-telemetry/opentelemetry-specification/blob/v1.47.0/specification/common/README.md#attribute.
repeated .opentelemetry.proto.common.v1.KeyValue attributes = 4; -
getAttributesOrBuilder
attributes is a collection of attribute key/value pairs on the link. Attribute keys MUST be unique (it is not allowed to have more than one attribute with the same key). The attribute values SHOULD NOT contain empty values. The attribute values SHOULD NOT contain bytes values. The attribute values SHOULD NOT contain array values different than array of string values, bool values, int values, double values. The attribute values SHOULD NOT contain kvlist values. The behavior of software that receives attributes containing such values can be unpredictable. These restrictions can change in a minor release. The restrictions take origin from the OpenTelemetry specification: https://github.com/open-telemetry/opentelemetry-specification/blob/v1.47.0/specification/common/README.md#attribute.
repeated .opentelemetry.proto.common.v1.KeyValue attributes = 4; -
getDroppedAttributesCount
int getDroppedAttributesCount()dropped_attributes_count is the number of dropped attributes. If the value is 0, then no attributes were dropped.
uint32 dropped_attributes_count = 5;- Returns:
- The droppedAttributesCount.
-
getFlags
int getFlags()Flags, a bit field. Bits 0-7 (8 least significant bits) are the trace flags as defined in W3C Trace Context specification. To read the 8-bit W3C trace flag, use `flags & SPAN_FLAGS_TRACE_FLAGS_MASK`. See https://www.w3.org/TR/trace-context-2/#trace-flags for the flag definitions. Bits 8 and 9 represent the 3 states of whether the link is remote. The states are (unknown, is not remote, is remote). To read whether the value is known, use `(flags & SPAN_FLAGS_CONTEXT_HAS_IS_REMOTE_MASK) != 0`. To read whether the link is remote, use `(flags & SPAN_FLAGS_CONTEXT_IS_REMOTE_MASK) != 0`. Readers MUST NOT assume that bits 10-31 (22 most significant bits) will be zero. When creating new spans, bits 10-31 (most-significant 22-bits) MUST be zero. [Optional].
fixed32 flags = 6;- Returns:
- The flags.
-