/// import { CompressionAlgorithm } from "../../../configuration/compression.mjs"; import { OTLPExporterConfigBase } from "../../../configuration/legacy-base-configuration.mjs"; import { HttpAgentFactory } from "./otlp-node-http-configuration.mjs"; import * as http from "http"; import * as https from "https"; //#region src/platform/node/configuration/legacy-node-configuration.d.ts /** * Node.js HTTP exporter configuration. */ interface OTLPExporterNodeConfigBase extends OTLPExporterConfigBase { /** * Sets `keepAlive` on the Node.js HTTP or HTTPS agent created by the exporter. * * @remarks * If `httpAgentOptions` is an object with its own `keepAlive` value, the * value in `httpAgentOptions` takes precedence. * * @defaultValue true */ keepAlive?: boolean; /** * Compression algorithm for outgoing OTLP HTTP requests. * * @defaultValue CompressionAlgorithm.NONE */ compression?: CompressionAlgorithm; /** * Custom HTTP agent options or a factory function for creating agents. * * @remarks * 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. * * @example Using agent options directly: * httpAgentOptions: { * keepAlive: true, * maxSockets: 10 * } * * @example Using a factory with dynamic import: * httpAgentOptions: async (protocol) => { * const module = protocol === 'http:' ? await import('http') : await import('https'); * return new module.Agent({ keepAlive: true }); * } */ httpAgentOptions?: http.AgentOptions | https.AgentOptions | HttpAgentFactory; /** * 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 */ userAgent?: string; } //#endregion export { OTLPExporterNodeConfigBase }; //# sourceMappingURL=legacy-node-configuration.d.mts.map