Interface: Span
Defined in: tracing/types.ts:38
A trace span representing a unit of work
Properties
attributes
attributes: SpanAttributes;
Defined in: tracing/types.ts:60
Span attributes
durationMs?
optional durationMs?: number;
Defined in: tracing/types.ts:54
Duration in milliseconds (undefined if still active)
endTime?
optional endTime?: number;
Defined in: tracing/types.ts:52
End time in milliseconds since epoch (undefined if still active)
events
events: SpanEvent[];
Defined in: tracing/types.ts:62
Span events (timestamped annotations)
kind
kind: SpanKind;
Defined in: tracing/types.ts:48
Span kind
name
name: string;
Defined in: tracing/types.ts:46
Human-readable span name
parentSpanId?
optional parentSpanId?: string;
Defined in: tracing/types.ts:44
Parent span ID (undefined for root spans)
spanId
spanId: string;
Defined in: tracing/types.ts:40
Unique span identifier
startTime
startTime: number;
Defined in: tracing/types.ts:50
Start time in milliseconds since epoch
status
status: SpanStatus;
Defined in: tracing/types.ts:56
Span status
statusMessage?
optional statusMessage?: string;
Defined in: tracing/types.ts:58
Status message (typically for errors)
traceId
traceId: string;
Defined in: tracing/types.ts:42
Trace ID this span belongs to