Zum Inhalt springen
Deutsch

TracingExtension

Dieser Inhalt ist noch nicht in deiner Sprache verfügbar.

Defined in: src/tracing/TracingExtension.ts:14

system.extension(TracingExtensionId) accessor. Hands back the currently-installed Tracer (defaults to the noop), so framework instrumentation can call tracerOf(system).activeSpan() etc. without conditional checks. Opt in by calling enable(tracer) with either a RecordingTracer (for tests) or an adapter around @opentelemetry/api’s tracer.

new TracingExtension(_system): TracingExtension

Defined in: src/tracing/TracingExtension.ts:17

ActorSystem

TracingExtension

captureMessagePayloads(enabled): void

Defined in: src/tracing/TracingExtension.ts:70

Attach the message itself, as JSON, to every actor.receive span.

A span otherwise records only the message’s type, which answers “what happened” but not “to what” — and for a kind-tagged object literal the type alone is thin. The cost is a JSON.stringify per traced message, bounded in depth and length, which is why it is a separate switch from recordRootSpans rather than implied by it.

boolean

void


disable(): void

Defined in: src/tracing/TracingExtension.ts:77

Reset back to the noop — primarily for tests.

void


enable(tracer): Tracer

Defined in: src/tracing/TracingExtension.ts:24

Plug in a tracer. Idempotent if you re-pass the same instance.

Tracer

Tracer


get(): Tracer

Defined in: src/tracing/TracingExtension.ts:21

Currently-installed tracer (noop until enable(...) is called).

Tracer


isCapturingMessagePayloads(): boolean

Defined in: src/tracing/TracingExtension.ts:74

boolean


isEnabled(): boolean

Defined in: src/tracing/TracingExtension.ts:30

True if a real (non-noop) tracer is installed.

boolean


isRecordingRootSpans(): boolean

Defined in: src/tracing/TracingExtension.ts:58

boolean


recordRootSpans(enabled): void

Defined in: src/tracing/TracingExtension.ts:49

Trace every message, not only the ones already inside a trace.

Normally an actor opens a span only when the message arrived with a trace context or a span was active at the call site, which makes the framework propagate-only: a plain ref.tell(…) from outside any span produces nothing. That is the right default for production — you decide what is worth a trace — but it means a tracing UI shows an empty screen on a system that is plainly busy.

Switch this on and every message becomes a root span. Expect the volume to match the traffic; this is a debugging mode, not a sampling policy.

boolean

void

if no tracer is installed — root spans against the noop tracer would cost work and record nothing.