Skip to content

Tracer

Defined in: src/tracing/Tracer.ts:65

activeSpan(): Span | null

Defined in: src/tracing/Tracer.ts:72

Active span on this async stack, or null outside any active scope.

Span | null


extractContext(carrier): SpanContext | null

Defined in: src/tracing/Tracer.ts:82

Inverse of injectContext — recover a SpanContext from a carrier.

TraceCarrier | null | undefined

SpanContext | null


injectContext(): TraceCarrier | null

Defined in: src/tracing/Tracer.ts:79

Serialise the active span’s context to a W3C-style carrier — used by the cluster transport to thread context across the wire. Returns null when no span is active or the tracer is a noop.

TraceCarrier | null


startSpan(name, opts?): Span

Defined in: src/tracing/Tracer.ts:66

string

SpanOptions

Span


withActiveSpan<T>(span, fn): T

Defined in: src/tracing/Tracer.ts:69

Run fn with span as the active span (read by activeSpan()).

T

Span

() => T

T