Skip to content

RecordedSpan

Defined in: src/tracing/RecordingTracer.ts:36

Reference Tracer implementation. Generates real ids, tracks span hierarchy via parent context, propagates the active span through AsyncLocalStorage, and records ended spans into an in-memory buffer for assertions.

Production usage: the recorder list is your sink. For full OpenTelemetry export, pass each completed span through to the OTel SDK in onSpanEnd — or write a thin adapter that delegates the Tracer calls to @opentelemetry/api.trace.getTracer(...).

This impl is not an OpenTelemetry SDK — it doesn’t sample, batch, or export. Its role is the in-process backbone for actor-ts’s instrumentation; the SDK boundary lives in the adapter layer.

readonly attributes: Readonly<Record<string, AttributeValue>>

Defined in: src/tracing/RecordingTracer.ts:43


readonly context: SpanContext

Defined in: src/tracing/RecordingTracer.ts:39


readonly endTimeMs: number

Defined in: src/tracing/RecordingTracer.ts:42


readonly exceptions: readonly Error[]

Defined in: src/tracing/RecordingTracer.ts:46


readonly kind: SpanKind

Defined in: src/tracing/RecordingTracer.ts:38


readonly name: string

Defined in: src/tracing/RecordingTracer.ts:37


readonly parent: SpanContext | null

Defined in: src/tracing/RecordingTracer.ts:40


readonly startTimeMs: number

Defined in: src/tracing/RecordingTracer.ts:41


readonly status: SpanStatus

Defined in: src/tracing/RecordingTracer.ts:44


readonly optional statusMessage?: string

Defined in: src/tracing/RecordingTracer.ts:45