export type OTelExporterType = 'otlp-grpc' | 'otlp-http' | 'console' | 'file'; export type OTelEnabledVia = 'policy' | 'envVar' | 'setting' | 'otlpEndpointEnvVar' | 'dbSpanExporterOnly' | 'disabled'; /** Default OTLP endpoint used when no env var or setting overrides it. */ export declare const DEFAULT_OTLP_ENDPOINT = "http://localhost:4318"; export interface OTelConfig { readonly enabled: boolean; /** True when OTel was enabled via setting/env var, not just implied by dbSpanExporter. */ readonly enabledExplicitly: boolean; /** How OTel was enabled — used for telemetry to track adoption channels. */ readonly enabledVia: OTelEnabledVia; readonly exporterType: OTelExporterType; readonly otlpEndpoint: string; readonly otlpProtocol: 'grpc' | 'http/json' | 'http/protobuf'; readonly captureContent: boolean; /** * Maximum size (in characters) for free-form content attributes (prompts, * tool args, etc.). A value of `0` disables truncation entirely (the * default), matching the OTel spec's `AttributeValueLengthLimit` default of * `Infinity`. Set to a positive value when targeting backends that cap * per-attribute size to keep OTLP batches under the backend limit; consult * the backend's documentation for the appropriate value. */ readonly maxAttributeSizeChars: number; readonly fileExporterPath?: string; readonly dbSpanExporter: boolean; readonly logLevel: 'trace' | 'debug' | 'info' | 'warn' | 'error'; readonly httpInstrumentation: boolean; readonly serviceName: string; readonly serviceVersion: string; readonly sessionId: string; readonly resourceAttributes: Record; /** * Extra OTLP request headers (e.g. auth tokens) applied directly to the exporter. Carried * out-of-band from process env so secrets never leak into spawned tool subprocesses. */ readonly headers: Record; } export interface OTelConfigInput { env: Record; settingEnabled?: boolean; settingExporterType?: OTelExporterType; settingOtlpEndpoint?: string; settingCaptureContent?: boolean; settingMaxAttributeSizeChars?: number; settingOutfile?: string; settingDbSpanExporter?: boolean; /** OTLP wire protocol mirroring `OTEL_EXPORTER_OTLP_PROTOCOL` (`http/json`, `http/protobuf`, `grpc`). */ settingProtocol?: string; policyEnabled?: boolean; policyExporterType?: OTelExporterType; policyOtlpEndpoint?: string; policyCaptureContent?: boolean; policyOutfile?: string; /** Enterprise-managed OTLP wire protocol (raw `telemetry.protocol`). */ policyProtocol?: string; /** Service name from VS Code setting (`github.copilot.chat.otel.serviceName`). */ settingServiceName?: string; /** Enterprise-managed `service.name` (raw `telemetry.serviceName`). */ policyServiceName?: string; /** Resource attributes from VS Code setting (`github.copilot.chat.otel.resourceAttributes`). */ settingResourceAttributes?: Record; /** Enterprise-managed resource attributes (raw `telemetry.resourceAttributes`). */ policyResourceAttributes?: Record; /** OTLP headers from VS Code setting (`github.copilot.chat.otel.headers`). */ settingHeaders?: Record; /** Enterprise-managed OTLP headers (raw `telemetry.headers`). */ policyHeaders?: Record; extensionVersion: string; sessionId: string; vscodeTelemetryLevel?: string; } /** * Resolve OTel configuration with layered precedence: * 1. Enterprise policy values from managed settings (highest) * 2. COPILOT_OTEL_* env vars * 3. OTEL_EXPORTER_OTLP_* standard env vars * 4. VS Code settings * 5. Defaults (lowest) */ export declare function resolveOTelConfig(input: OTelConfigInput): OTelConfig; //# sourceMappingURL=otelConfig.d.ts.map