OTLP telemetry silently not emitted on v2.1.153 and v2.1.169 (macOS, interactive TUI)
Resolved 💬 2 comments Opened Jun 9, 2026 by nakaocho Closed Jun 12, 2026
Summary
OTLP telemetry (metrics + logs) is silently not emitted from interactive TUI sessions on macOS, on both v2.1.153 (stable) and v2.1.169 (latest), despite:
CLAUDE_CODE_ENABLE_TELEMETRY=1set and confirmed via/doctor(telemetryDisabledBy=none)- All
OTEL_*env vars correctly set in~/.claude/settings.json - OTLP endpoint reachable from the host (TCP ESTABLISHED via
lsof, TLS handshake OK) - The same endpoint receives
HTTP 200 partialSuccessfor directcurlPOSTs with the same bearer token (and401for invalid/missing token — so auth is correctly enforced server-side) - Other OTel emitters on the same collector pipeline (non-Claude-Code workloads) deliver normally
Receiver-side counters (receiver_accepted_log_records, accepted_metric_points) do not increment for the Claude Code client across 15+ minute interactive sessions with multiple turns.
Environment
- OS: macOS 25.5.0 (Darwin)
- Claude Code:
v2.1.153andv2.1.169(both reproduced) - Install method: native installer (
~/.local/share/claude/versions/) - Auto-updates channel:
stable(pinned viaautoUpdatesChannel) - No project/local/managed-settings overrides of telemetry
Config (~/.claude/settings.json env)
CLAUDE_CODE_ENABLE_TELEMETRY=1
OTEL_METRICS_EXPORTER=otlp
OTEL_LOGS_EXPORTER=otlp
OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf
OTEL_EXPORTER_OTLP_ENDPOINT=https://<our-otel-collector>:4318
OTEL_EXPORTER_OTLP_HEADERS=Authorization=Bearer <redacted>
OTEL_METRIC_EXPORT_INTERVAL=60000
OTEL_RESOURCE_ATTRIBUTES=deployment.environment=production,cloud.region=ap-northeast-1,...
What we ruled out
- Server side: collector + downstream sinks proven healthy via direct OTLP injection (
/v1/metricsand/v1/logsboth 200, land in our SIEM and CloudWatch within seconds). - Auth: valid token returns 200, missing/invalid returns 401. Token format
Authorization=Bearer <token>is correctly parsed by the OTel SDK (confirmed via curl withAuthorization: Bearer <token>header). - Endpoint:
lsofshows Claude Code holds anESTABLISHEDTCP connection to the collector's resolved IP on port 4318. NLB target groups healthy. - Telemetry disable:
/doctorreportstelemetryDisabledBy=none. No managed-settings, project, or local overrides. - Version regression: tested both
v2.1.153andv2.1.169. Both fail identically. So this is not a latest-channel-only regression. - TLS: handshake OK, ALPN not enforced, HTTP/1.1 + protobuf returns 400 (expected — proves the path reaches the OTLP HTTP receiver).
What we cannot observe externally
consoleexporter is unusable for diagnosis:- Interactive TUI:
inkpatchesconsole, so OTLP-via-console output never reaches stdout or2>redirected files. - Headless
claude -p: process exits before flush; output is zero bytes regardless of session content. claude --debugdoes not emit any OTEL-related diagnostic lines.- No on-disk OTEL error logs.
Asks
- Is there a recommended SDK-level diagnostic to confirm whether the OTLP exporter is constructed and emitting on macOS interactive sessions?
- Are there known regressions in
v2.1.15x–v2.1.16xaround OTLP exporter initialization for interactive TUI mode? CHANGELOG entries we found (v2.1.162log silent-drop fix,v2.1.151SDK/headless tracing race fix) don't match the symptom (metrics also affected, andv2.1.169post-fix is also affected). - Workaround to force a telemetry flush that is observable to operators?
Happy to provide additional diagnostics (collector logs, packet captures, etc.) on request.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗