{"version":3,"file":"legacy-node-configuration.js","sourceRoot":"","sources":["../../../src/configuration/legacy-node-configuration.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AA8CH,IAAY,oBAGX;AAHD,WAAY,oBAAoB;IAC9B,qCAAa,CAAA;IACb,qCAAa,CAAA;AACf,CAAC,EAHW,oBAAoB,GAApB,4BAAoB,KAApB,4BAAoB,QAG/B","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// NOTE: do not change these imports to be actual imports, otherwise they WILL break `@opentelemetry/instrumentation-http`\nimport type * as http from 'http';\nimport type * as https from 'https';\n\nimport type { OTLPExporterConfigBase } from './legacy-base-configuration';\nimport type { HttpAgentFactory } from './otlp-node-http-configuration';\n\n/**\n * Collector Exporter node base config\n */\nexport interface OTLPExporterNodeConfigBase extends OTLPExporterConfigBase {\n  keepAlive?: boolean;\n  compression?: CompressionAlgorithm;\n  /**\n   * Custom HTTP agent options or a factory function for creating agents.\n   *\n   * @remarks\n   * Prefer using `http.AgentOptions` or `https.AgentOptions` over a factory function wherever possible.\n   * If using a factory function (`HttpAgentFactory`), **do not import `http.Agent` or `https.Agent`\n   * statically at the top of the file**.\n   * Instead, use dynamic `import()` or `require()` to load the module. This ensures that the `http` or `https`\n   * module is not loaded before `@opentelemetry/instrumentation-http` can instrument it.\n   *\n   * @example <caption> Using agent options directly: </caption>\n   * httpAgentOptions: {\n   *   keepAlive: true,\n   *   maxSockets: 10\n   * }\n   *\n   * @example <caption> Using a factory with dynamic import: </caption>\n   * httpAgentOptions: async (protocol) => {\n   *   const module = protocol === 'http:' ? await import('http') : await import('https');\n   *   return new module.Agent({ keepAlive: true });\n   * }\n   */\n  httpAgentOptions?: http.AgentOptions | https.AgentOptions | HttpAgentFactory;\n  /**\n   * User agent header string to be prepended to the exporter's default value.\n   * Availablie since v1.49.0 of the spec.\n   * Ref: https://opentelemetry.io/docs/specs/otel/protocol/exporter/#user-agent\n   */\n  userAgent?: string;\n}\n\nexport enum CompressionAlgorithm {\n  NONE = 'none',\n  GZIP = 'gzip',\n}\n"]}