[−][src]Module opentelemetry::api::trace::span
OpenTelemetry Span interface
A Span
represents a single operation within a trace. Span
s can be nested to form a trace
tree. Each trace contains a root span, which typically describes the end-to-end latency and,
optionally, one or more sub-spans for its sub-operations.
The Span
's start and end timestamps reflect the elapsed real time of the operation. A Span
's
start time SHOULD be set to the current time on span creation. After the Span
is created, it
SHOULD be possible to change its name, set its Attributes
, and add Links
and Events
.
These MUST NOT be changed after the Span
's end time has been set.
Spans
are not meant to be used to propagate information within a process. To prevent misuse,
implementations SHOULD NOT provide access to a Span
's attributes besides its SpanContext
.
Vendors may implement the Span
interface to effect vendor-specific logic. However, alternative
implementations MUST NOT allow callers to create Spans directly. All Span
s MUST be created
via a Tracer.
Enums
SpanKind |
|
StatusCode | The |
Traits
Span | Interface for a single operation within a trace. |