import { type SpanContext, type Tracer } from '@opentelemetry/api'; export declare function getTracer(): Tracer; /** * The active span's context, read fresh on every call — nothing here is * ever cached. `utils/log/create-logger.ts`'s `emit` calls this once per * ACCEPTED record (after the level check, never before) so a logger built * before any tracer provider registers still picks up spans started after * registration. Caching this at logger construction would repeat the exact * mistake `telemetry/metrics.ts` documents for a meter: a bag that * captured the no-op instance once stayed no-op for the rest of the * process even after a real provider registered later. * * `undefined` whenever nothing is active — the DEFAULT, not an edge case * this function has to detect. `@opentelemetry/api` ships a * `NoopContextManager` until something registers a real one * (`@namzu/telemetry`'s `registerTelemetry` does, via * `NodeTracerProvider.register()`), and that default's `active()` * unconditionally returns `ROOT_CONTEXT` — it does not even remember what a * caller set with `context.with()`. So a host that never configures * telemetry gets `undefined` here on every call, for free, with nothing in * this function special-casing "telemetry not configured": that behaviour * is the api's own default, not a check performed here. Which is also why * this can only ever ADD information to a record — reading the active * context can never make an unconfigured host fail a check that would * otherwise pass (`an-optional-dependency-may-not-degrade-a-check`, in * reverse). */ export declare function getActiveSpanContext(): SpanContext | undefined; //# sourceMappingURL=runtime-accessors.d.ts.map