/** * Resolve the OTel API the SDK should emit spans against. * * Priority: * 1. Explicit `ClientOptions.otel` — pass it through. * 2. Module already on the dependency graph at construction time — * `require('@opentelemetry/api')` succeeds when the consumer has it * installed, returns `undefined` otherwise. * * Resolution is synchronous + best-effort. If `@opentelemetry/api` isn't * installed (it's an OPTIONAL peer), the SDK proceeds with `undefined` and * every span call is a no-op. No warnings, no bundled fallback. * * Why `createRequire` rather than dynamic `import('@opentelemetry/api')`? * Dynamic `import()` is async; widening every call site that wants the OTel * API to be async would push the resolution into the hot path. The peer * module is small and synchronously-loadable; resolving once at construction * is the right tradeoff. */ import type { OTelAPI } from '../tracing/types.js'; /** * Resolve an OTel API instance given an explicit override. Returns * `undefined` if neither the override nor a global `@opentelemetry/api` is * available — the SDK's emission layer treats `undefined` as "no-op every * span call". */ export declare function resolveOTel(explicit: OTelAPI | undefined): OTelAPI | undefined; //# sourceMappingURL=resolveOTel.d.ts.map