OpenTelemetry SDK
    Preparing search index...

    Node.js HTTP exporter configuration.

    interface OTLPExporterNodeConfigBase {
        compression?: CompressionAlgorithm;
        concurrencyLimit?: number;
        headers?: Record<string, string> | HeadersFactory;
        httpAgentOptions?: HttpAgentFactory | AgentOptions | AgentOptions;
        keepAlive?: boolean;
        selfObsMeterProvider?: MeterProvider;
        timeoutMillis?: number;
        url?: string;
        userAgent?: string;
    }

    Hierarchy (View Summary)

    Index
    compression?: CompressionAlgorithm

    Compression algorithm for outgoing OTLP HTTP requests.

    CompressionAlgorithm.NONE
    
    concurrencyLimit?: number

    Maximum number of in-flight export requests.

    30
    
    headers?: Record<string, string> | HeadersFactory

    Custom headers that will be attached to the HTTP request that's sent to the endpoint.

    Prefer using a plain object over a factory function wherever possible. A factory function may be async and MUST NOT throw errors. It should return a string map containing the headers to add to the request.

    headers: {
    Authorization: "Api-Token my-secret-token",
    }
    headers: async () => {
    return {
    Authorization: `Bearer ${token}`,
    };
    };
    httpAgentOptions?: HttpAgentFactory | AgentOptions | AgentOptions

    Custom HTTP agent options or a factory function for creating agents.

    Prefer using http.AgentOptions or https.AgentOptions over a factory function wherever possible. If using a factory function (HttpAgentFactory), do not import http.Agent or https.Agent statically at the top of the file. Instead, use dynamic import() or require() to load the module. This lets @opentelemetry/instrumentation-http instrument the module first.

    httpAgentOptions: {
    keepAlive: true,
    maxSockets: 10
    }
    httpAgentOptions: async (protocol) => {
    const module = protocol === 'http:' ? await import('http') : await import('https');
    return new module.Agent({ keepAlive: true });
    }
    keepAlive?: boolean

    Sets keepAlive on the Node.js HTTP or HTTPS agent created by the exporter.

    If httpAgentOptions is an object with its own keepAlive value, the value in httpAgentOptions takes precedence.

    true
    
    selfObsMeterProvider?: MeterProvider

    MeterProvider to record metrics for the exporter itself. This option is experimental and is subject to breaking changes in minor releases.

    timeoutMillis?: number

    Maximum time, in milliseconds, the OTLP exporter will wait for each batch export.

    10000
    
    url?: string

    Collector endpoint URL for the exporter.

    Defaults to the signal-specific endpoint, such as http://localhost:4318/v1/traces, http://localhost:4318/v1/metrics, or http://localhost:4318/v1/logs.

    userAgent?: string

    User agent header string to be prepended to the exporter's default value. Available since v1.49.0 of the spec. Ref: https://opentelemetry.io/docs/specs/otel/protocol/exporter/#user-agent