{"name":"OTEL_LOG_RAW_API_BODIES","slug":"otel-log-raw-api-bodies","family":"env","title":"Environment variables","noun":"environment variable","description":"Changing the raw-API-body telemetry variable now takes effect instead of being frozen at startup.","description_source":"entry","described_by":{"version":"2.1.236","anchor":"opentelemetry-raw-body-setting-re-reads-when-it-changes"},"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.236","released_at":"2026-08-19 18:45:14","spans":2}},"aliases":[],"entries":[{"version":"2.1.295","anchor":"telemetry-base-url-now-from-a-helper-printistty-omitted-i","heading":"Diskless sessions turn off raw API body logging","line":"In a diskless session, `OTEL_LOG_RAW_API_BODIES` is ignored and some terminal details are left out of usage data","released_at":"2026-10-08 18:22:58","reason":"found in this entry's text"},{"version":"2.1.274","anchor":"otel-raw-api-body-writer-now-guards-against-symlinkhardlink","heading":"OTEL raw API body writer now guards against symlink\/hardlink tampering","line":"OTEL raw API body logging now refuses to write if the target file is a symlink, has multiple hard links, or changes identity mid-write","released_at":"2026-09-16 22:36:09","reason":"named in this entry, found in this entry's text"},{"version":"2.1.274","anchor":"otel-raw-requestresponse-body-dumping-rewritten-to-atomic-w","heading":"OTEL raw request\/response body dumping rewritten to atomic writes","line":"OTEL debug logging of raw request\/response bodies now writes files atomically instead of writing then handling errors after the fact","released_at":"2026-09-16 22:36:09","reason":"named in this entry"},{"version":"2.1.236","anchor":"opentelemetry-raw-body-setting-re-reads-when-it-changes","heading":"OpenTelemetry raw body setting re-reads when it changes","line":"Changing the raw-API-body telemetry variable now takes effect instead of being frozen at startup.","released_at":"2026-08-19 18:45:14","reason":"named in this entry, found in this entry's text"}],"entries_total":4,"docs":[{"source":"claude-code","path":"agent-sdk\/modifying-system-prompts","title":"Modifying system prompts","documented":false},{"source":"claude-code","path":"agent-sdk\/observability","title":"Observability with OpenTelemetry","documented":false},{"source":"claude-code","path":"monitoring-usage","title":"Monitoring","documented":false},{"source":"claude-code","path":"server-managed-settings","title":"Configure server-managed settings","documented":false},{"source":"claude-code","path":"settings-reference","title":"All settings","documented":false}],"docs_total":5,"gates":[],"related":[{"name":"OTEL_LOG_ASSISTANT_RESPONSES","slug":"otel-log-assistant-responses","description":"Controls whether the OpenTelemetry `assistant_response` event carries the text of Claude's reply. True (`1`, `true`, `yes`, `on`) puts the joined text blocks in the `response` attribute; false (`0`, `false`, `no`, `off`) sends `<REDACTED>`. Unset or any other value follows `OTEL_LOG_USER_PROMPTS`. The event always carries `response_length`."},{"name":"OTEL_LOG_MANAGED_SETTINGS","slug":"otel-log-managed-settings","description":"Managed settings resolution is now reported to telemetry, with sensitive values redacted"},{"name":"OTEL_LOG_TOOL_CONTENT","slug":"otel-log-tool-content","description":"Project settings files can no longer set OpenTelemetry exporter endpoints, headers, certificates or telemetry opt-ins"},{"name":"OTEL_LOG_TOOL_DETAILS","slug":"otel-log-tool-details","description":"Boolean; only `1`, `true`, `yes` or `on` turn it on. When on, Claude Code's telemetry carries tool details it otherwise leaves out, such as file paths and full Bash commands on tool events, skill and subagent names, error text, and command names that are otherwise reported as `custom`."},{"name":"OTEL_LOG_USER_PROMPTS","slug":"otel-log-user-prompts","description":"Remote-session telemetry now redacts prompts, model names and agent ids when sending traces off-box"},{"name":"OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT","slug":"otel-logrecord-attribute-value-length-limit","description":"Maximum length of log record attribute values in the bundled OpenTelemetry logs SDK; unset means no limit. Claude Code also uses the smallest of this, `OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT`, `OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT` and `CLAUDE_CODE_OTEL_CONTENT_MAX_LENGTH` (default `61440`) as the character cap on the content it records in telemetry, such as prompts, system prompts, model output and tool inputs and results, cutting longer content and appending a `[TRUNCATED - Content exceeds ... limit]` note."},{"name":"OTEL_LOGS_EXPORT_INTERVAL","slug":"otel-logs-export-interval","description":"Milliseconds between batched exports for the OpenTelemetry log exporters set by `OTEL_LOGS_EXPORTER`; default `5000` when unset. Claude Code's first-party event logging also uses it as its batch delay when its remote config gives no `scheduledDelayMillis`, with a default of `10000` there."},{"name":"OTEL_LOGS_EXPORTER","slug":"otel-logs-exporter","description":"Telemetry export can now send metrics, logs, and traces to different destinations instead of forcing all three to OTLP"}],"url":"https:\/\/changelogs.core-directive.com\/reference\/env\/otel-log-raw-api-bodies","family_url":"https:\/\/changelogs.core-directive.com\/reference\/env.json"}