[BUG] OTLP metric exporter never initialized in 2.1.126 (regression ~2026-04-30)
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report
- [x] I am using the latest version of Claude Code
What's Wrong?
OTEL_METRICS_EXPORTER=otlp is configured but no metrics are exported. Debug log shows the OTLP log exporter init runs, but the OTLP metric exporter init is silently absent — there is no getOtlpMetricExporters line and no Created N metric exporter(s) line.
Metrics stopped arriving at our Datadog org around 2026-04-30 and have not resumed. Worked fine before that.
What Should Happen?
Symmetric to the log path:
[3P telemetry] getOtlpMetricExporters: types=["otlp"], protocol=http/protobuf, endpoint=https://otlp.datadoghq.eu/v1/metrics
[3P telemetry] Created 1 metric exporter(s)
Error Messages/Logs
claude --debug, ~/.claude/debug/latest:
[DEBUG] CA certs: Config fallback - settingsEnv keys: CLAUDE_CODE_ENABLE_TELEMETRY,OTEL_EXPORTER_OTLP_METRICS_ENDPOINT,OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE,OTEL_EXPORTER_OTLP_PROTOCOL,OTEL_METRICS_EXPORTER,OTEL_RESOURCE_ATTRIBUTES,OTEL_EXPORTER_OTLP_HEADERS
[DEBUG] [3P telemetry] Waiting for remote managed settings before telemetry init
[DEBUG] [3P telemetry] Remote managed settings loaded, initializing telemetry
[DEBUG] [3P telemetry] isTelemetryEnabled=true (CLAUDE_CODE_ENABLE_TELEMETRY=1)
[DEBUG] [3P telemetry] getOtlpLogExporters: types=[], protocol=http/protobuf, endpoint=undefined
[DEBUG] [3P telemetry] Created 0 log exporter(s)
[DEBUG] Org fast mode: disabled (extra_usage_disabled)
[DEBUG] BigQuery metrics exported successfully
(BigQuery metrics ... is Anthropic's 1P internal exporter, unrelated.)
No getOtlpMetricExporters line and no Created N metric exporter(s) line ever appears, regardless of whether OTEL_LOGS_EXPORTER is set.
Steps to Reproduce
~/.claude/settings.json (env section):
{
"env": {
"CLAUDE_CODE_ENABLE_TELEMETRY": "1",
"OTEL_METRICS_EXPORTER": "otlp",
"OTEL_EXPORTER_OTLP_PROTOCOL": "http/protobuf",
"OTEL_EXPORTER_OTLP_METRICS_ENDPOINT": "https://otlp.datadoghq.eu/v1/metrics",
"OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE": "delta",
"OTEL_EXPORTER_OTLP_HEADERS": "DD-API-KEY=<redacted>,dd-otel-metric-config={\"resource_attributes_as_tags\": true}",
"OTEL_RESOURCE_ATTRIBUTES": "user.email=<redacted>"
}
}
- Run
claude --debug. - Inspect
~/.claude/debug/latest. - Observe metric exporter init never runs (no
getOtlpMetricExportersline). - No metrics arrive at Datadog.
Diagnostics
- DD-API-KEY validated independently:
curl -i -X POST https://otlp.datadoghq.eu/v1/metrics -H 'DD-API-KEY: <redacted>' -H 'Content-Type: application/x-protobuf' --data-binary ''→HTTP/2 400 / Payload is empty— key + endpoint OK. - No local managed-settings.json present (broken symlink at
/Library/Application Support/ClaudeCode/managed-settings.json); only remote managed settings load. - Setting
OTEL_LOGS_EXPORTER=otlpmakes the log exporter run (separate 403 fromotlp.datadoghq.eu/v1/logs— Datadog's OTLP intake at that host is metrics-only; unrelated). - Datadog org-wide
claude_code.*metric ingestion across all users in our tenant cuts off at the same time (~2026-04-30 ~01:00 UTC), suggesting a Claude Code release / remote-managed-setting rollout, not a per-user config issue.
Possibly Related
- #55105 (Honeycomb env-var leakage) — fix landed 2026-05-04, but our cutoff predates it.
Claude Model
Opus
Is this a regression?
Yes — was working before ~2026-04-30.
Last Working Version
Unknown exact version; metrics flowing prior to 2026-04-30.
Claude Code Version
2.1.126
Platform
Anthropic API / direct (not Bedrock / Vertex)
Operating System
macOS (Darwin 25.4.0)
Terminal/Shell
zsh
Additional Information
If this is gated behind a remote-managed setting (e.g. extra_usage_disabled), please document it and expose a way for users to opt back in.
This issue has 6 comments on GitHub. Read the full discussion on GitHub ↗