import { type Span } from "https://deno.land/x/live@1.48.5/deps.ts";
An interface that represents a span. A span represents a single operation within a trace. Examples of span might include remote procedure calls or a in-process function calls to sub-components. A Trace has a single, top-level "root" Span that in turn may have zero or more child Spans, which in turn may have children.
Spans are created by the Tracer.startSpan method.
Methods
Returns the SpanContext object associated with this Span.
Get an immutable, serializable identifier for this span that can be used to create new child spans. Returned SpanContext is usable even after the span ends.
Adds an event to the Span.
Sets a status to the span. If used, this will override the default Span status. Default is SpanStatusCode.UNSET. SetStatus overrides the value of previous calls to SetStatus on the Span.
Updates the Span name.
This will override the name provided via Tracer.startSpan.
Upon this update, any sampling behavior based on Span name will depend on the implementation.