interface TelemetryContext
Since 0.2.0

Opaque handle representing the parent context for span creation.

In the real (OTel-backed) implementation this wraps the OTel Context. In noop mode it is unused but still accepted for API parity.

Carries the W3C Trace Context fields extracted from incoming traceparent / tracestate headers so the real TracerHost can use them to parent spans.

Properties

Internal marker — consumers must not inspect this type.

readonly
optional
traceId: string

32-character lowercase hex trace ID (W3C format).

readonly
optional
spanId: string

16-character lowercase hex parent span ID (W3C format).

readonly
optional
traceFlags: string

2-character lowercase hex trace flags (W3C format).

readonly
optional
tracestate: string

Raw tracestate header value, if present.

Usage

import { type TelemetryContext } from "common/src/index.ts";