{"version":"2.1.268","anchor":"otel-spanerror-telemetry-now-separates-a-normalized-error-c","canonical_anchor":"otel-telemetry-redaction-for-off-box-remote-session-traces","heading":"OTel telemetry redacts sensitive data and normalizes error info for off-box traces","tier":"internal","area":"Telemetry","url":"https:\/\/changelogs.core-directive.com\/v\/2.1.268\/e\/otel-spanerror-telemetry-now-separates-a-normalized-error-c","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.268","markdown":"### OTel telemetry redacts sensitive data and normalizes error info for off-box traces\n\nClaude Code now redacts prompts, model names and agent ids in OTel traces sent off-box, and standardizes error reporting\n\n**What**\n\n- A new gate detects when Claude Code is running as `CLAUDE_CODE_REMOTE` with an OTel traces endpoint that isn't localhost (\"off-box\"). When true, spans for interactions, LLM requests, tool calls, and subagent spawns redact sensitive data: user prompts become `\"<REDACTED>\"` even if `OTEL_LOG_USER_PROMPTS` is set, model names are replaced with a hashed\/normalized value (with a new `tool_name_safe`\/`query_source_safe` attribute instead of the raw value), agent ids are anonymized, and custom subagent types are reported simply as `\"custom\"`. The interaction span also gains link propagation (`queued_sends`) and a `parent.source` attribute.\n\n- Tool-call failure telemetry now records a separate `errorClass` field alongside the error message\/code.\n\n- Error-attribute recording was reworked so a single `error` string is replaced by both an `error` field and a sanitized `error_class` (letters\/digits\/underscore only, matching `\/^[A-Za-z][A-Za-z0-9_]{0,47}$\/`). The raw `error` text is omitted entirely when telemetry is judged to be leaving the box, using the same off-box condition described above.\n\n**Why** These changes keep sensitive data like prompts, model names, and raw error text out of telemetry that leaves the local machine, while still preserving a normalized, non-sensitive error classification for debugging.\n\n- Area: Telemetry\n- Names: `error_class`\n- Tier: Under the hood\n- Useful: 2\/5\n- Signal: 2\/5"}