{"name":"CLAUDE_CODE_ENABLE_TELEMETRY","slug":"claude-code-enable-telemetry","family":"env","title":"Environment variables","noun":"environment variable","description":"Set to `1` to enable OpenTelemetry data collection for metrics and logging. Required before configuring OTel exporters. Set it in your shell, user settings, or managed settings. Ignored in [project and local settings](\/docs\/en\/settings-reference#variables-claude-code-ignores-in-env). See [Monitoring](\/docs\/en\/monitoring-usage)","description_source":"docs","described_by":{"doc":"claude-code\/env-vars","title":"Environment variables"},"presence":{"first_seen":"2.1.138","removed_in":null,"in_current_build":true,"newest_mined":"2.1.309","builds":150,"mined_builds":150,"first_cited":{"version":"2.1.248","released_at":"2026-08-27 20:35:36","spans":1}},"aliases":[],"entries":[{"version":"2.1.286","anchor":"3p-telemetry-dropped-event-warning-downgraded-to-debug-unles","heading":"Dropped-telemetry warning only shows when telemetry is turned on","line":"The \"Event dropped\" telemetry message is now a warning only when `CLAUDE_CODE_ENABLE_TELEMETRY` is set, and a quieter debug message otherwise","released_at":"2026-09-30 17:14:38","reason":"found in this entry's text"},{"version":"2.1.284","anchor":"built-in-opentelemetry-hooks-module-cc-plugin-otlp-dark-l","heading":"OpenTelemetry export is being moved onto Claude Code's built-in hooks layer","line":"A built-in module now sends Claude Code's event records to your OpenTelemetry collector through the hooks layer, behind a switch that falls back to off","released_at":"2026-09-28 17:11:59","reason":"found in this entry's text"},{"version":"2.1.284","anchor":"new-built-in-cc-plugin-otlp-plugin-that-sends-opentelemetr","heading":"Built-in plugin can send telemetry through the plugin hook system","line":"A new built-in plugin, off by default, can route Claude Code's OpenTelemetry event records through plugin hooks instead of the built-in path","released_at":"2026-09-28 17:11:59","reason":"found in this entry's text"},{"version":"2.1.282","anchor":"project-settings-can-no-longer-set-opentelemetry-exporter-en","heading":"Project settings can no longer point your telemetry at another server","line":"Project settings files can no longer set OpenTelemetry exporter endpoints, headers, certificates or telemetry opt-ins","released_at":"2026-09-24 15:56:22","reason":"found in this entry's text"},{"version":"2.1.281","anchor":"headless-telemetry-init-deferred-and-a-parked-spare-mode","heading":"Headless: telemetry init deferred and a parked-spare mode","line":"In print mode, telemetry setup now waits unless CLAUDE_CODE_ENABLE_TELEMETRY is set, and a new parked-spare state skips session-start hooks","released_at":"2026-09-23 17:01:17","reason":"found in this entry's text, named in this entry"},{"version":"2.1.248","anchor":"telemetry-enablement-read-through-a-helper","heading":"Telemetry enablement read through a helper","line":"The telemetry on\/off check moved into a helper; the same env var still controls it.","released_at":"2026-08-27 20:35:36","reason":"named in this entry, found in this entry's text"},{"version":"2.0.18","anchor":"opentelemetry-tracing-support-opt-in","heading":"OpenTelemetry Tracing Support (Opt-In)","line":null,"released_at":"2025-10-15 19:45:18","reason":"found in this entry's text"}],"entries_total":7,"docs":[{"source":"claude-code","path":"env-vars","title":"Environment variables","documented":true},{"source":"claude-code","path":"agent-sdk\/hosting","title":"Hosting the Agent SDK","documented":false},{"source":"claude-code","path":"agent-sdk\/observability","title":"Observability with OpenTelemetry","documented":false},{"source":"claude-code","path":"claude-apps-gateway-config","title":"Claude apps gateway configuration","documented":false},{"source":"claude-code","path":"desktop","title":"Desktop application","documented":false},{"source":"claude-code","path":"monitoring-usage","title":"Monitoring","documented":false},{"source":"claude-code","path":"self-hosted-environments-reference","title":"Self-hosted environments reference","documented":false},{"source":"claude-code","path":"settings","title":"Claude Code settings","documented":false},{"source":"claude-code","path":"settings-reference","title":"All settings","documented":false}],"docs_total":9,"gates":[],"related":[{"name":"CLAUDE_CODE_ENABLE_APPEND_SUBAGENT_PROMPT","slug":"claude-code-enable-append-subagent-prompt","description":"Gates the extra subagent system prompt: when this is truthy and a prompt was supplied by the hidden `--append-subagent-system-prompt` option, its file variant, or the SDK's `appendSubagentSystemPrompt` initialize field, the text is appended to a Task-tool subagent's system prompt (skipped for agents with an isolated context and in one other case). Claude Code sets it to `1` itself when either command-line option supplies a prompt."},{"name":"CLAUDE_CODE_ENABLE_AUTO_MODE","slug":"claude-code-enable-auto-mode","description":"Accepted for compatibility with older releases and has no effect. Auto mode is available by default on every provider, including Amazon Bedrock, Google Cloud's Agent Platform, Microsoft Foundry, and signed-in [Claude apps gateway](\/docs\/en\/claude-apps-gateway) sessions. In v2.1.158 through v2.1.206, setting this to `1` was required to make [auto mode](\/docs\/en\/permission-modes#eliminate-prompts-with-auto-mode) available on those providers"},{"name":"CLAUDE_CODE_ENABLE_AWAY_SUMMARY","slug":"claude-code-enable-away-summary","description":"Override [session recap](\/docs\/en\/interactive-mode#session-recap) availability. Set to `0` to force recaps off regardless of the `\/config` toggle. Set to `1` to force recaps on when [`awaySummaryEnabled`](\/docs\/en\/settings-reference#awaysummaryenabled) is `false`. Takes precedence over the setting and `\/config` toggle"},{"name":"CLAUDE_CODE_ENABLE_BACKGROUND_PLUGIN_REFRESH","slug":"claude-code-enable-background-plugin-refresh","description":"Set to `1` to refresh plugin state at turn boundaries in [non-interactive mode](\/docs\/en\/headless) after a background install completes. Off by default because the refresh changes the system prompt mid-session, which invalidates [prompt caching](\/docs\/en\/prompt-caching) for that turn"},{"name":"CLAUDE_CODE_ENABLE_CFC","slug":"claude-code-enable-cfc","description":"Restricted sessions skip Claude in Chrome browser wiring, same as safe mode."},{"name":"CLAUDE_CODE_ENABLE_DESIGN_MCP","slug":"claude-code-enable-design-mcp","description":"Forces the built-in Claude Design MCP server on (`1`, `true`, `yes`, `on`) or off (`0`, `false`, `no`, `off`); unset or any other value falls back to the `tengu_omelette_whisk` flag, default off. When on and the API provider is first-party, Claude Code adds an HTTP MCP server named `claude_design` at `https:\/\/api.anthropic.com\/v1\/design\/mcp` to its built-in servers, and it also enables the `\/design` command, which another condition can enable as well."},{"name":"CLAUDE_CODE_ENABLE_DESIGN_SYNC","slug":"claude-code-enable-design-sync","description":null},{"name":"CLAUDE_CODE_ENABLE_EXPERIMENTAL_ADVISOR_TOOL","slug":"claude-code-enable-experimental-advisor-tool","description":"The experimental advisor override no longer skips per-model eligibility checks, only the rank requirement."},{"name":"CLAUDE_CODE_ENABLE_FEEDBACK_SURVEY_FOR_OTEL","slug":"claude-code-enable-feedback-survey-for-otel","description":"Set to `1` to route the \"How is Claude doing?\" session quality survey to your own [OpenTelemetry collector](\/docs\/en\/monitoring-usage) when Anthropic-bound nonessential traffic is blocked. Survey ratings are emitted only as OTEL events to your configured collector. No survey data is sent to Anthropic in this mode. Applies when `CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC`, `DISABLE_TELEMETRY`, or `DO_NOT_TRACK` is set, and has no effect otherwise. `CLAUDE_CODE_DISABLE_FEEDBACK_SURVEY` and the organization product feedback policy take precedence"},{"name":"CLAUDE_CODE_ENABLE_FINE_GRAINED_TOOL_STREAMING","slug":"claude-code-enable-fine-grained-tool-streaming","description":"Controls whether tool call inputs stream from the API as Claude generates them. With this off, a large tool input such as a long file write arrives only after Claude finishes generating it, which can look like it's hanging. Enabled by default on the Anthropic API. On Amazon Bedrock and Google Cloud's Agent Platform, enabled per model where the deployed container supports it. Set to `0` to opt out. Set to `1` to force on when routing through a proxy via `ANTHROPIC_BASE_URL`, `ANTHROPIC_VERTEX_BASE_URL`, or `ANTHROPIC_BEDROCK_BASE_URL`. Off by default on Microsoft Foundry and [gateway](\/docs\/en\/llm-gateway) connections"}],"url":"https:\/\/changelogs.core-directive.com\/reference\/env\/claude-code-enable-telemetry","family_url":"https:\/\/changelogs.core-directive.com\/reference\/env.json"}