[DOCS] OpenTelemetry docs omit `claude_code.assistant_response` and `OTEL_LOG_ASSISTANT_RESPONSES`
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 asapi_request_body/api_response_bodylog events (default: disabled). Bodies include the entire conversation history.
The environment variables page lists:
OTEL_LOG_USER_PROMPTS| Set to1to 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_RESPONSESis unset, it followsOTEL_LOG_USER_PROMPTS - deployments that already log prompt content can start receiving response content on upgrade
- setting
OTEL_LOG_ASSISTANT_RESPONSES=0keeps 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_responseevent - the default redaction behavior
- the inheritance behavior from
OTEL_LOG_USER_PROMPTSwhen unset - the explicit
0opt-out for organizations that want prompt logging without assistant-response logging
Suggested wording:
OTEL_LOG_ASSISTANT_RESPONSES: Controls whetherclaude_code.assistant_responselog events include model response text. Set to1to include response text. Set to0to keep response text redacted even whenOTEL_LOG_USER_PROMPTS=1. When unset, this followsOTEL_LOG_USER_PROMPTS.
Impact
High - Prevents users from using a feature
Additional Context
Affected Pages:
| Page | Context |
|------|---------|
| https://code.claude.com/docs/en/monitoring-usage | OpenTelemetry common configuration table and log/event descriptions omit assistant-response logging |
| https://code.claude.com/docs/en/env-vars | Environment variable table omits OTEL_LOG_ASSISTANT_RESPONSES |
| https://code.claude.com/docs/en/settings | otelHeadersHelper references OpenTelemetry configuration but does not link to the new response-content control |
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."
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗