pub struct SpanV2 {
pub trace_id: Annotated<TraceId>,
pub parent_span_id: Annotated<SpanId>,
pub span_id: Annotated<SpanId>,
pub name: Annotated<OperationType>,
pub status: Annotated<SpanV2Status>,
pub is_remote: Annotated<bool>,
pub kind: Annotated<SpanV2Kind>,
pub start_timestamp: Annotated<Timestamp>,
pub end_timestamp: Annotated<Timestamp>,
pub links: Annotated<Array<SpanV2Link>>,
pub attributes: Annotated<Object<Attribute>>,
pub other: Object<Value>,
}
Expand description
A version 2 (transactionless) span.
Fields§
§trace_id: Annotated<TraceId>
The ID of the trace to which this span belongs.
parent_span_id: Annotated<SpanId>
The ID of the span enclosing this span.
span_id: Annotated<SpanId>
The Span ID.
name: Annotated<OperationType>
Span type (see OperationType
docs).
status: Annotated<SpanV2Status>
The span’s status.
is_remote: Annotated<bool>
Indicates whether a span’s parent is remote.
For OpenTelemetry spans, this is derived from span flags bits 8 and 9. See
SPAN_FLAGS_CONTEXT_HAS_IS_REMOTE_MASK
and SPAN_FLAGS_CONTEXT_IS_REMOTE_MASK
.
The states are:
false
: is not remotetrue
: is remote
kind: Annotated<SpanV2Kind>
Used to clarify the relationship between parents and children, or to distinguish between
spans, e.g. a server
and client
span with the same name.
See https://opentelemetry.io/docs/specs/otel/trace/api/#spankind
start_timestamp: Annotated<Timestamp>
Timestamp when the span started.
end_timestamp: Annotated<Timestamp>
Timestamp when the span was ended.
links: Annotated<Array<SpanV2Link>>
Links from this span to other spans.
attributes: Annotated<Object<Attribute>>
Arbitrary attributes on a span.
other: Object<Value>
Additional arbitrary fields for forwards compatibility.