@tigorhutasuhut/telemetry-js - v0.7.3
    Preparing search index...

    Interface SDKConfig

    Configuration passed to initSDK to initialise tracing, metrics, and logging.

    interface SDKConfig {
        env?: Record<string, unknown>;
        exporterEndpoint?: string;
        exporterHeaders?: Record<string, string>;
        instrumentations?: unknown[];
        logsExporterEndpoint?: string;
        metricsExporterEndpoint?: string;
        metricsExportIntervalMs?: number;
        resourceAttributes?: Record<string, string>;
        runtime?: RuntimeName;
        serviceName?: string;
        tracesExporterEndpoint?: string;
    }
    Index

    Properties

    env?: Record<string, unknown>

    Environment 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.

    exporterEndpoint?: string

    Base 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.

    exporterHeaders?: Record<string, string>

    Additional headers sent with every OTLP export request (e.g. auth tokens).

    instrumentations?: unknown[]

    OpenTelemetry instrumentations to register (Node only).

    logsExporterEndpoint?: string

    Signal-specific OTLP endpoint for logs (full URL, no suffix appended).

    metricsExporterEndpoint?: string

    OTLP HTTP endpoint for the metrics exporter. Falls back to exporterEndpoint + /v1/metrics when omitted.

    metricsExportIntervalMs?: number

    Metrics collection interval in milliseconds (default 60000).

    resourceAttributes?: Record<string, string>

    Extra key/value pairs merged into the OpenTelemetry Resource.

    runtime?: RuntimeName

    Explicit runtime to use. When omitted the SDK auto-detects by calling each registered adapter's detect() method.

    serviceName?: string

    The logical name of the service reported in every span.

    tracesExporterEndpoint?: string

    Signal-specific OTLP endpoint for traces (full URL, no suffix appended).