Libraries
    Preparing search index...

    Interface OtelConfig

    Configuration for setupOtel.

    interface OtelConfig {
        debug?: boolean;
        disableLogs?: boolean;
        disableMetrics?: boolean;
        disableTraces?: boolean;
        environment?: string;
        headers?: Record<string, string>;
        instrumentations?: unknown[];
        logsEndpoint?: string;
        metricsEndpoint?: string;
        metricsExportIntervalMs?: number;
        otlpEndpoint?: string;
        resourceAttributes?: Record<string, string | number | boolean>;
        serviceName: string;
        serviceVersion?: string;
        tracesEndpoint?: string;
    }
    Index

    Properties

    debug?: boolean

    Enable verbose OTel SDK diagnostics (sets the global diag logger).

    false
    
    disableLogs?: boolean

    Disable log export.

    false
    
    disableMetrics?: boolean

    Disable metrics export.

    false
    
    disableTraces?: boolean

    Disable trace export.

    false
    
    environment?: string

    Deployment environment name (e.g. production, staging, dev). Becomes the deployment.environment.name resource attribute.

    headers?: Record<string, string>

    Optional headers to send with every OTLP export request (e.g. authentication tokens for hosted backends).

    instrumentations?: unknown[]

    Auto-instrumentations to register at SDK startup.

    Use the helpers from @cleverbrush/otel/instrumentations (e.g. outboundHttpInstrumentations(), runtimeMetrics()).

    logsEndpoint?: string

    Override the OTLP logs endpoint (/v1/logs is appended).

    metricsEndpoint?: string

    Override the OTLP metrics endpoint (/v1/metrics is appended).

    metricsExportIntervalMs?: number

    Metric export interval in milliseconds.

    60000
    
    otlpEndpoint?: string

    Base OTLP/HTTP endpoint for traces, logs, and metrics.

    If not provided, falls back to the standard OTel environment variables (OTEL_EXPORTER_OTLP_ENDPOINT, OTEL_EXPORTER_OTLP_TRACES_ENDPOINT, etc.).

    Per-signal endpoints below take precedence over this value.

    process.env.OTEL_EXPORTER_OTLP_ENDPOINT
    
    resourceAttributes?: Record<string, string | number | boolean>

    Additional resource attributes merged onto the default resource. Useful for host.name, cloud.region, custom team tags, etc.

    serviceName: string

    Logical name of the service emitting telemetry. Becomes the service.name resource attribute and is the primary identifier in observability backends.

    serviceVersion?: string

    Optional service version → service.version resource attribute.

    tracesEndpoint?: string

    Override the OTLP traces endpoint (/v1/traces is appended).