Unclear It is not clear when the exporters are set to use only configured headers, or whether that is the default.
Claude Code can send logs and traces to an OpenTelemetry collector, a service that gathers usage and performance data. Headers, such as a login token, are sent with that data.
When the logs or traces exporter is set to use only configured headers, Claude Code now briefly unsets OTEL_EXPORTER_OTLP_HEADERS and the matching per-signal headers variable while the exporter is set up. It puts them back when the exporter shuts down. Only the headers given in configuration are then used.
This changes which login headers telemetry sends when headers come from configuration. Headers set in those environment variables are not used by an exporter set up this way.
It is not clear when the exporters are set to use only configured headers, or whether that is the default.
Fixed telemetry from Claude Desktop sessions behind a Claude apps gateway being rejected when OTEL_EXPORTER_OTLP_HEADERS is set