[BUG] Monitoring(OpenTelemetry) is broken since 2.64, still not working in 2.67 (latest version)
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.
Found 1 possible duplicate issue:
- 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
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
-
Console exporter (no network required):
CLAUDE_CODE_ENABLE_TELEMETRY=1 \ OTEL_METRICS_EXPORTER=console \ OTEL_METRIC_EXPORT_INTERVAL=5000 \ claudeResult: Zero output after 5+ minutes of active usage (file edits, prompts, tool calls), including after
/exit -
Debug logging enabled:
{ "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
-
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
-psingle 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!
I found this EXACT same issue and came to report it, thank you for mentioning this, @andrewmitchell-automations
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.
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).
As a workaround, you can set the otel env-vars in you shell instead of in settings.json for now.
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!
Looks like on v2.0.70 it started working again. Telemetry successfully sent using otel
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!
Sorry for the trouble here. This was fixed in v2.0.70. Thanks everyone for the detailed debugging info and for your patience!