OTEL per-request events not emitted on Microsoft Foundry (CLI, v2.1.126)
Open 💬 3 comments Opened May 4, 2026 by pab1it0
Environment
- Claude Code 2.1.126
- macOS, terminal CLI (iTerm.app)
CLAUDE_CODE_USE_FOUNDRY=1withANTHROPIC_FOUNDRY_BASE_URLandANTHROPIC_FOUNDRY_API_KEYsetCLAUDE_CODE_ENABLE_TELEMETRY=1,OTEL_*_EXPORTER=otlp, OTLP/HTTP endpoint configured and verified working
Steps to reproduce
- Configure
CLAUDE_CODE_USE_FOUNDRY=1+ANTHROPIC_FOUNDRY_BASE_URL+ANTHROPIC_FOUNDRY_API_KEY. - Configure standard OTEL OTLP export to a working collector.
- Launch
claudefrom a terminal and issue several prompts. - Inspect the collector.
Expected
Per-request OTEL events emit on Foundry.
Actual
The following events did not emit during 2.5 hours of active Foundry use:
claude_code.api_requestclaude_code.api_errorclaude_code.cost.usageclaude_code.token.usageclaude_code.tool_decisionclaude_code.tool_resultclaude_code.skill_activated
The following events did emit normally:
claude_code.session.countclaude_code.active_time.totalclaude_code.mcp_server_connectionclaude_code.user_promptclaude_code.hook_execution_complete
Comparison (same user, same OTEL config)
| Window (UTC) | Provider | api_request | cost.usage | token.usage |
|---|---|---|---|---|
| 07:12 – 07:44 | Anthropic API | 42 | yes | yes |
| 08:14 – 10:42 | Foundry | 0 | 0 | 0 |
| 10:43 – 10:59 | Anthropic API | 3 | yes | yes |
Removing the Foundry env vars restored the full event stream within minutes.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗