[Bug] OTEL Export functionality disabled or non-functional

Status Closed — not planned
Reported on v2.1.179
Maintainer reply ✓ Yes — bcherny
Activity 5 comments · opened Jun 25, 2026 · closed Aug 16, 2026
💡 Likely answer: A maintainer (bcherny, collaborator) responded on this thread — see the highlighted reply below.

Bug Description
OTEL Export not working from Claude Code

Environment Info

  • Platform: darwin
  • Terminal: Apple_Terminal
  • Version: 2.1.179
  • Feedback ID: 82fef84d-cf81-495b-a67a-8a19399713ee

Errors

[]

Summary

Since v2.1.113, Claude Code's OTLP metrics/logs exporter silently no-ops. The
OTLP exporter packages are no longer compiled into the binary, so
OTEL_METRICS_EXPORTER=otlp produces zero output and zero errors. This removes the
only supported mechanism for Claude Code usage observability on the Team plan.
Pinning to the last working build (2.1.111) is not an acceptable mitigation — it
strips current model access and the current agentic harness from every engineer.

Environment

  • Deployment: managed-settings.json pushed to developer workstations

(<platform: macOS via MDM / mixed — fill in>)

  • Telemetry backend: jellyfish, OTLP | http/protobuf ,

endpoint <…>

  • Last known-good version: 2.1.111
  • Broken: 2.1.113 through latest version

Business impact

On the Team plan, OpenTelemetry is the only mechanism available to us for Claude
Code token/usage data (see "Why OTEL is our only path" below). With OTLP export
broken, we have no programmatic visibility into Claude Code usage across the
engineering org. The only known way to restore it client-side is to pin the fleet
to 2.1.111, which removes access to current models and the current agentic harness
for every developer — a non-starter for a daily-driver deployment.

Symptom (precise)

  • OTEL_METRICS_EXPORTER=console → full metrics print to stdout. **Pipeline

initializes and generates data.**

  • OTEL_METRICS_EXPORTER=otlp (identical env, same shell) → collector receives

zero requests; the process opens no connection to the collector; nothing
on stderr; no log file under ~/.claude; OTEL_LOG_LEVEL=debug produces no
output.

  • Collector verified healthy independently — a synthetic POST to /v1/metrics

with the same credentials returns HTTP 200.

View original on GitHub ↗

4 Comments

juliencasanova · 3 months ago

Additional data point — the regression also affects the http/json OTLP transport, and on a later version than reported here.

Setup: macOS, local OTLP collector on http://localhost:4318, config via ~/.claude/settings.json env block (also reproduced with the vars exported directly in the shell):

CLAUDE_CODE_ENABLE_TELEMETRY=1
OTEL_METRICS_EXPORTER=otlp
OTEL_LOGS_EXPORTER=otlp
OTEL_EXPORTER_OTLP_PROTOCOL=http/json
OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4318

A/B test, same machine, same healthy collector (manual POST /v1/logs → HTTP 200):

| Version | OTLP (http/json) export |
|---------|-------------------------|
| 2.1.185 | ✅ logs + metrics received |
| 2.1.191 → 2.1.195 | ❌ zero requests, zero errors, nothing on stderr |

So unlike the http/protobuf exporter (reported broken since 2.1.113), the http/json exporter kept working through 2.1.185 and broke somewhere in 2.1.186–2.1.191. This narrows the bundling regression: both OTLP transports are now no-ops, but they dropped at different versions. OTEL_METRICS_EXPORTER=console is unaffected, consistent with the OTLP exporter packages being excluded from the compiled binary.

github-actions[bot] · 1 month ago

Closing for now — inactive for too long. Please open a new issue if this is still relevant.

bcherny collaborator · 1 month ago

I tried to reproduce this on Linux with the released 2.1.233, and also on 2.1.179 (your version) and 2.1.111 (your known-good pin), following https://code.claude.com/docs/en/monitoring-usage with a local OTLP receiver on localhost:4318.

Result: OTLP export worked on every version — http/json and http/protobuf both delivered real POSTs to /v1/metrics and /v1/logs, and grpc opened real gRPC connections to :4317. So the OTLP exporters are still compiled into the binary, including the native builds introduced in 2.1.113.

I did find one way to get exactly your symptom (zero output, zero errors): if OTEL_EXPORTER_OTLP_PROTOCOL (or the per-signal protocol variable) is unset, telemetry initialization fails silently — Claude Code has no default OTLP protocol (docs), and the error is only visible with --debug. This behaves the same on 2.1.111, though, so it wouldn't explain a change at 2.1.113 by itself. Also note that on machines with managed settings, OTLP variables set there remove developer-set per-signal variables at startup (docs).

To dig further, could you share:

  1. The exact OTEL_* variables you set (and where — shell vs managed-settings.json env block)
  2. The telemetry-related lines from claude --debug (they're prefixed [3P telemetry])
  3. Whether adding OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf changes anything

🤖 Generated with Claude Code

github-actions[bot] · 1 month ago

We weren't able to reproduce this. Could you provide steps to trigger the issue — what you ran, what happened, and what you expected? This issue will be closed automatically if there's no activity within 7 days.

Showing cached comments. Read the full discussion on GitHub ↗