[BUG] Monitoring(OpenTelemetry) is broken since 2.64, still not working in 2.67 (latest version)

Status Fixed / completed
Maintainer reply ✓ Yes — igorkofman
Activity 11 comments · opened Dec 12, 2025 · closed Dec 19, 2025
💡 Likely answer: A maintainer (igorkofman, collaborator) responded on this thread — see the highlighted reply below.

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

Claude Code Opentelemetry feature is broken.
Broken means it does not produce any logs / metrics.
It does not produce metrics / logs even after we configure that.

What Should Happen?

After we configure the telemetry setting, the claude code should produce metrics / logs.

Error Messages/Logs

No error messages found.

Steps to Reproduce

~/.claude/settings.json

{
  "env": {
    "AWS_PROFILE": "<AWS ROLE>",
    "AWS_REGION": "<AWS REGION>",
    "NODE_TLS_REJECT_UNAUTHORIZED": 0,
    "ANTHROPIC_SMALL_FAST_MODEL_AWS_REGION": "<AWS REGION>",
    "CLAUDE_CODE_USE_BEDROCK": 1,
    "ANTHROPIC_MODEL": "<Model Inference Profile ID>",
    "ANTHROPIC_SMALL_FAST_MODEL": "<Model Inference Profile ID>",
    "ANTHROPIC_CUSTOM_HEADERS": "X-Amzn-Bedrock-GuardrailIdentifier: <GuardrailID>\nX-Amzn-Bedrock-GuardrailVersion: <GuardrailVersion>",
    "CLAUDE_CODE_ENABLE_TELEMETRY": 1,
    "OTEL_METRICS_EXPORTER": "console",
    "OTEL_METRIC_EXPORT_INTERVAL": 1000,
    "OTEL_METRICS_INCLUDE_SESSION_ID": false,
    "OTEL_RESOURCE_ATTRIBUTES": "user.name=testuser"
  }
}

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

2.0.64

Claude Code Version

2.0.67

Platform

AWS Bedrock

Operating System

macOS

Terminal/Shell

iTerm2

Additional Information

We have a dashboard that monitors usage.
In the claude_code_active_time_seconds_total metric, the last version we are seeing is 2.0.64.

View original on GitHub ↗

11 Comments

github-actions[bot] · 8 months ago

Found 1 possible duplicate issue:

  1. https://github.com/anthropics/claude-code/issues/13771

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

andrewmitchell-automations · 8 months ago

Additional Debugging Data - Independent Confirmation

_yes, Claude code helped me debug and write this comment!_

I hit this same issue and spent significant time debugging before finding this issue. Adding my findings in case they help the investigation:

Environment

  • Claude Code Version: 2.0.67
  • Platform: macOS Tahoe 26.1
  • API: Anthropic API (not Bedrock)

What Was Tested

  1. Console exporter (no network required):

``bash
CLAUDE_CODE_ENABLE_TELEMETRY=1 \
OTEL_METRICS_EXPORTER=console \
OTEL_METRIC_EXPORT_INTERVAL=5000 \
claude
`
**Result:** Zero output after 5+ minutes of active usage (file edits, prompts, tool calls), including after
/exit`

  1. Debug logging enabled:

``json
{
"env": {
"CLAUDE_CODE_ENABLE_TELEMETRY": "1",
"OTEL_METRICS_EXPORTER": "console",
"OTEL_LOG_LEVEL": "debug",
"OTEL_METRIC_EXPORT_INTERVAL": "10000"
}
}
``
Result: No OTEL debug output whatsoever - SDK appears to never initialize

  1. OTLP endpoint (verified working):
  • Tested endpoint directly with curl → HTTP 200
  • Logs show zero POST requests from Claude Code
  • Alloy OTLP receiver healthy and waiting

Key Finding

The OTEL SDK does not initialize at all in v2.0.67. Even with OTEL_METRICS_EXPORTER=console (which requires no network and should print directly to stdout), nothing is output. This rules out any endpoint/network configuration issues.

Verification Steps Taken

  • ✅ Confirmed no managed settings override (/Library/Application Support/ClaudeCode/ doesn't exist)
  • ✅ Confirmed env vars are set correctly in ~/.claude/settings.json
  • ✅ Confirmed env vars exported in shell before running claude
  • ✅ Tested both interactive sessions and -p single commands
  • ✅ Checked statsig feature flags cache (no obvious telemetry disable flag visible)

Conclusion

This appears to be a complete failure of OTEL SDK initialization in versions 2.0.64+, not a configuration or export issue. The telemetry subsystem simply doesn't start.

Happy to provide additional debugging if helpful!

rbonestell · 8 months ago

I found this EXACT same issue and came to report it, thank you for mentioning this, @andrewmitchell-automations

andrewmitchell-automations · 8 months ago

Credit to @FutureGadget for the initial report. On that note, @FutureGadget, any chance you can update the tags to reflect that this is not just an issue on AWS Bedrock? I'm getting it on desktop.

igorkofman collaborator · 8 months ago

Hey folks, I can confirm this is broken.
A fix was merged and we'll get it to you asap (on Monday afternoon at the latest).

igorkofman collaborator · 8 months ago

As a workaround, you can set the otel env-vars in you shell instead of in settings.json for now.

rbonestell · 8 months ago
As a workaround, you can set the otel env-vars in you shell instead of in settings.json for now.

This is what I have done, however it adds non-zero complexity to mass assignment of managed settings via MDM. Thanks for getting to this issue so quickly!

mdolinin · 8 months ago

Looks like on v2.0.70 it started working again. Telemetry successfully sent using otel

FutureGadget · 8 months ago

Yes it's working since 2.0.70. I just upgraded to 2.0.71 and it's working too 😃
Thanks for the quick follow up!

vadim-anthropic · 8 months ago

Sorry for the trouble here. This was fixed in v2.0.70. Thanks everyone for the detailed debugging info and for your patience!

github-actions[bot] · 8 months ago

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.