RecordedSpan
Este conteúdo não está disponível em sua língua ainda.
RecordedSpan =
object
Defined in: src/tracing/RecordingTracer.ts:37
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.
Properties
Section titled “Properties”attributes
Section titled “attributes”
readonlyattributes:Readonly<Record<string,AttributeValue>>
Defined in: src/tracing/RecordingTracer.ts:57
context
Section titled “context”
readonlycontext:SpanContext
Defined in: src/tracing/RecordingTracer.ts:40
endHighResolutionMs?
Section titled “endHighResolutionMs?”
readonlyoptionalendHighResolutionMs?:number
Defined in: src/tracing/RecordingTracer.ts:56
endTimeMs
Section titled “endTimeMs”
readonlyendTimeMs:number
Defined in: src/tracing/RecordingTracer.ts:43
exceptions
Section titled “exceptions”
readonlyexceptions:ReadonlyArray<Error>
Defined in: src/tracing/RecordingTracer.ts:60
readonlykind:SpanKind
Defined in: src/tracing/RecordingTracer.ts:39
readonlyname:string
Defined in: src/tracing/RecordingTracer.ts:38
parent
Section titled “parent”
readonlyparent:SpanContext|null
Defined in: src/tracing/RecordingTracer.ts:41
startHighResolutionMs?
Section titled “startHighResolutionMs?”
readonlyoptionalstartHighResolutionMs?:number
Defined in: src/tracing/RecordingTracer.ts:55
Monotonic-clock start, in fractional milliseconds.
startTimeMs/endTimeMs are wall clock, which is what an exporter
needs but too coarse to lay out a flame graph: actor message
handling routinely completes inside a single millisecond, so every
bar would be zero-width. These two are taken from the same
high-resolution clock the benchmarks use. Absent when the caller
supplied explicit timestamps — there is no honest way to invent a
monotonic reading for a time someone else chose.
startTimeMs
Section titled “startTimeMs”
readonlystartTimeMs:number
Defined in: src/tracing/RecordingTracer.ts:42
status
Section titled “status”
readonlystatus:SpanStatus
Defined in: src/tracing/RecordingTracer.ts:58
statusMessage?
Section titled “statusMessage?”
readonlyoptionalstatusMessage?:string
Defined in: src/tracing/RecordingTracer.ts:59
