OTEL_LOG_RAW_API_BODIES silently no-ops on Claude Desktop 1.5354 / embedded SDK 2.1.121
Claude cowork team plan (team customers)
Summary
Setting OTEL_LOG_RAW_API_BODIES=1 on Claude Desktop 1.5354.0 (instrumentation scope com.anthropic.claude_code.events v2.1.121) produces claude_code.api_request log records with no request/response body attributes. The same env var works correctly on:
- Claude Desktop 1.3883 (SDK 2.1.111) — bodies emitted ✅
- Claude Code CLI 2.1.123 — bodies emitted ✅
So this is a regression in the desktop bundle between SDK 2.1.111 → 2.1.121.
Reproduction
- Run a local OTLP collector on
:4318withmax_request_body_size: 0and a file exporter for ground-truth inspection. - Launch Claude Desktop 1.5354.0 from a shell with:
````
OTEL_LOG_RAW_API_BODIES=1
OTEL_LOGS_EXPORTER=otlp
OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf
OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4318 (exposed via ngrok)
- Send any prompt. Inspect the captured OTLP
claude_code.api_requestlog records (file exporter dump or downstream backend).
Observed
claude_code.api_request records contain only:
model, input_tokens, output_tokens, cache_read_tokens,
cache_creation_tokens, cost_usd, duration_ms,
request_id, speed, query_source, effort
No request_body, response_body, or any body-shaped attribute. Verified directly from the collector's raw OTLP file capture — i.e. the desktop app is not emitting bodies at the OTLP wire; it is not a downstream filter or size-limit issue.
Expected
Body attributes present on api_request records when OTEL_LOG_RAW_API_BODIES=1, as on CLI 2.1.123 and the older 1.3883 desktop build.
Environment
- macOS 26.4.1, arm64
- Claude Desktop
1.5354.0 - Embedded scope
com.anthropic.claude_code.events2.1.121
Related
- #50567 —
OTEL_METRICS_EXPORTER=otlpsilently no-ops in 2.1.113. Likely same root cause class (dynamic OTLP package require failing silently in the Bun-compiled binary). - #55269 — confirms bodies are being emitted in CLI 2.1.126 (just missing trace_id/span_id), suggesting the gap is desktop-bundle-specific, not a global removal.
- #33301, #25389 — earlier "OTEL works in CLI, no-ops in non-CLI surface" reports.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗