CLAUDE_CODE_ENABLE_TELEMETRY vs DISABLE_TELEMETRY
People think the ENABLE and DISABLE telemetry switches are the on and off of one thing. They are two roads. The first sends logs and stats to a tool you run. The second stops the usage data Claude Code sends home. You can set both. Your own team sees it all, and nothing goes home.
CLAUDE_CODE_ENABLE_TELEMETRY
Set to 1, it sends metrics and logs to your own collector.
CLAUDE_CODE_ENABLE_TELEMETRY set to 1 turns on OpenTelemetry. Claude Code can then send stats and logs to a tool you run. You need it before any OTEL export setting works. Set it in your shell, user settings or managed settings. Project settings skip it.
DISABLE_TELEMETRY
Any value stops the usage data sent home.
DISABLE_TELEMETRY stops the usage data Claude Code sends home. Any value turns it on, even 0 or false. To send data again, unset it. It also stops the fetch of feature flags. DO_NOT_TRACK=1 does the same, but there 0 means send.
In one line
- CLAUDE_CODE_ENABLE_TELEMETRY
- Set to 1, it sends metrics and logs to your own collector.
- DISABLE_TELEMETRY
- Any value stops the usage data sent home.