OptionalenvEnvironment variable map. Used in runtimes where process.env is unavailable
(e.g. Cloudflare Workers). Falls back to process.env when omitted.
Accepts Record<string, unknown> for compatibility with Cloudflare's Env
bindings — only string values are read; non-string values (KV, D1, etc.)
are silently ignored.
OptionalexporterBase OTLP HTTP endpoint (e.g. "https://otel.example.com").
The SDK appends per-signal paths (/v1/traces, /v1/metrics, /v1/logs)
automatically. Use signal-specific endpoints to override individual signals.
OptionalexporterAdditional headers sent with every OTLP export request (e.g. auth tokens).
OptionalinstrumentationsOpenTelemetry instrumentations to register (Node only).
OptionallogsSignal-specific OTLP endpoint for logs (full URL, no suffix appended).
OptionalmetricsOTLP HTTP endpoint for the metrics exporter. Falls back to exporterEndpoint + /v1/metrics when omitted.
OptionalmetricsMetrics collection interval in milliseconds (default 60000).
OptionalresourceExtra key/value pairs merged into the OpenTelemetry Resource.
OptionalruntimeExplicit runtime to use. When omitted the SDK auto-detects
by calling each registered adapter's detect() method.
OptionalserviceThe logical name of the service reported in every span.
OptionaltracesSignal-specific OTLP endpoint for traces (full URL, no suffix appended).
Configuration passed to initSDK to initialise tracing, metrics, and logging.