{"name":"OTEL_LOG_USER_PROMPTS","slug":"otel-log-user-prompts","family":"env","title":"Environment variables","noun":"environment variable","description":"Remote-session telemetry now redacts prompts, model names and agent ids when sending traces off-box","description_source":"entry","described_by":{"version":"2.1.268","anchor":"otel-telemetry-redaction-for-off-box-remote-session-traces"},"presence":{"first_seen":"2.1.138","removed_in":null,"in_current_build":true,"newest_mined":"2.1.308","builds":149,"mined_builds":149,"first_cited":null},"aliases":[],"entries":[{"version":"2.1.300","anchor":"otel-spans-get-gen-ai-attributes-prompt-redaction-handle","heading":"OpenTelemetry traces now carry standard AI attributes and support prompt redaction","line":"Interaction and tool spans in OpenTelemetry traces now include standard gen_ai attributes, and the recorded prompt can be redacted afterwards","released_at":"2026-10-14 14:27:26","reason":"found in this entry's text"},{"version":"2.1.288","anchor":"otel-prompt-logging-scrubs-account-memory-text","heading":"Exported traces now hide account memory text in logged prompts","line":"With `OTEL_LOG_USER_PROMPTS` on, logged prompts, outputs and tool data are now scrubbed of account memory text","released_at":"2026-10-02 18:30:40","reason":"found in this entry's text, named in this entry"},{"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.268","anchor":"otel-telemetry-redaction-for-off-box-remote-session-traces","heading":"OTEL telemetry redaction for off-box remote-session traces","line":"Remote-session telemetry now redacts prompts, model names and agent ids when sending traces off-box","released_at":"2026-09-10 18:41:11","reason":"found in this entry's text"},{"version":"2.1.193","anchor":"otel-log-assistant-responses-environment-variable","heading":"OTEL_LOG_ASSISTANT_RESPONSES Environment Variable","line":null,"released_at":"2026-06-25 19:05:08","reason":"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"},{"version":"1.0.18","anchor":"logging-improvements","heading":"Logging Improvements","line":null,"released_at":"2025-06-09 23:27:59","reason":"found in this entry's text"},{"version":"1.0.10","anchor":"new-features","heading":"New Features","line":null,"released_at":"2025-06-03 18:01:21","reason":"found in this entry's text"},{"version":"1.0.7","anchor":"new-features","heading":"New Features","line":null,"released_at":"2025-05-30 16:29:49","reason":"found in this entry's text"}],"entries_total":9,"docs":[{"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":"settings-reference","title":"All settings","documented":false}],"docs_total":3,"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_RAW_API_BODIES","slug":"otel-log-raw-api-bodies","description":"Changing the raw-API-body telemetry variable now takes effect instead of being frozen at startup."},{"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_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-user-prompts","family_url":"https:\/\/changelogs.core-directive.com\/reference\/env.json"}