{"version":"2.1.179","anchor":"claude-code-otel-diag-stderr-environment-variable","canonical_anchor":"claude-code-otel-diag-stderr-environment-variable","heading":"CLAUDE_CODE_OTEL_DIAG_STDERR Environment Variable","tier":null,"area":null,"scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.179\/e\/claude-code-otel-diag-stderr-environment-variable","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.179","markdown":"### `CLAUDE_CODE_OTEL_DIAG_STDERR` Environment Variable\n\n**What**\n\nWhen set, OpenTelemetry diagnostic errors are written directly to stderr in addition to the internal debug log. Useful when debugging custom telemetry or OTEL integrations.\n\n**Usage**\n\n`CLAUDE_CODE_OTEL_DIAG_STDERR=1 claude # OTEL errors now appear on stderr prefixed with \"[3P telemetry] OTEL diag error:\"` **Details** - Without this flag, OTEL errors only appear in the internal log (visible via `\/debug`) - With the flag, errors are also streamed to `process.stderr` immediately - The flag is stripped before spawning subprocesses so it doesn't leak **Evidence** New stderr path (search for `\"CLAUDE_CODE_OTEL_DIAG_STDERR\"`)"}