Documentation Type
Missing documentation (feature not documented)
Documentation Location
https://code.claude.com/docs/en/monitoring-usage
Section/Topic
OpenTelemetry common configuration variables, event reference, and environment variable reference.
Current Documentation
The monitoring page currently lists prompt and raw-body controls:
OTEL_LOG_USER_PROMPTS | Enable logging of user prompt content (default: disabled)
It also says:
OTEL_LOG_RAW_API_BODIES | Emit the full Anthropic Messages API request and response JSON as api_request_body / api_response_body log events (default: disabled). Bodies include the entire conversation history.
The environment variables page lists:
OTEL_LOG_USER_PROMPTS | Set to 1 to include user prompt text in OpenTelemetry traces and logs. Disabled by default (prompts are redacted).
What's Wrong or Missing?
Claude Code v2.1.193 added a claude_code.assistant_response OpenTelemetry log event containing model response text.
The release note also describes privacy-sensitive behavior that is not documented:
- response text is redacted unless
OTEL_LOG_ASSISTANT_RESPONSES=1
- when
OTEL_LOG_ASSISTANT_RESPONSES is unset, it follows OTEL_LOG_USER_PROMPTS
- deployments that already log prompt content can start receiving response content on upgrade
- setting
OTEL_LOG_ASSISTANT_RESPONSES=0 keeps prompts-only logging
The docs currently do not mention the event name, the new environment variable, the inheritance behavior, or the opt-out value.
Suggested Improvement
Update the monitoring and environment-variable docs with:
- a row for
OTEL_LOG_ASSISTANT_RESPONSES
- a short description of the
claude_code.assistant_response event
- the default redaction behavior
- the inheritance behavior from
OTEL_LOG_USER_PROMPTS when unset
- the explicit
0 opt-out for organizations that want prompt logging without assistant-response logging
Suggested wording:
OTEL_LOG_ASSISTANT_RESPONSES: Controls whether claude_code.assistant_response log events include model response text. Set to 1 to include response text. Set to 0 to keep response text redacted even when OTEL_LOG_USER_PROMPTS=1. When unset, this follows OTEL_LOG_USER_PROMPTS.
Impact
High - Prevents users from using a feature
Additional Context
Affected Pages:
Total scope: 3 pages affected
Version context: Claude Code v2.1.193 release note: "Added claude_code.assistant_response OpenTelemetry log event containing the model's response text. Redacted unless OTEL_LOG_ASSISTANT_RESPONSES=1; when that var is unset it follows OTEL_LOG_USER_PROMPTS, so deployments that already log prompt content will start receiving response content on upgrade - set OTEL_LOG_ASSISTANT_RESPONSES=0 to keep prompts-only."
Documentation Type
Missing documentation (feature not documented)
Documentation Location
https://code.claude.com/docs/en/monitoring-usage
Section/Topic
OpenTelemetry common configuration variables, event reference, and environment variable reference.
Current Documentation
The monitoring page currently lists prompt and raw-body controls:
It also says:
The environment variables page lists:
What's Wrong or Missing?
Claude Code v2.1.193 added a
claude_code.assistant_responseOpenTelemetry log event containing model response text.The release note also describes privacy-sensitive behavior that is not documented:
OTEL_LOG_ASSISTANT_RESPONSES=1OTEL_LOG_ASSISTANT_RESPONSESis unset, it followsOTEL_LOG_USER_PROMPTSOTEL_LOG_ASSISTANT_RESPONSES=0keeps prompts-only loggingThe docs currently do not mention the event name, the new environment variable, the inheritance behavior, or the opt-out value.
Suggested Improvement
Update the monitoring and environment-variable docs with:
OTEL_LOG_ASSISTANT_RESPONSESclaude_code.assistant_responseeventOTEL_LOG_USER_PROMPTSwhen unset0opt-out for organizations that want prompt logging without assistant-response loggingSuggested wording:
Impact
High - Prevents users from using a feature
Additional Context
Affected Pages:
OTEL_LOG_ASSISTANT_RESPONSESotelHeadersHelperreferences OpenTelemetry configuration but does not link to the new response-content controlTotal scope: 3 pages affected
Version context: Claude Code v2.1.193 release note: "Added
claude_code.assistant_responseOpenTelemetry log event containing the model's response text. Redacted unlessOTEL_LOG_ASSISTANT_RESPONSES=1; when that var is unset it followsOTEL_LOG_USER_PROMPTS, so deployments that already log prompt content will start receiving response content on upgrade - setOTEL_LOG_ASSISTANT_RESPONSES=0to keep prompts-only."