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=1 with ANTHROPIC_FOUNDRY_BASE_URL and ANTHROPIC_FOUNDRY_API_KEY set
  • CLAUDE_CODE_ENABLE_TELEMETRY=1, OTEL_*_EXPORTER=otlp, OTLP/HTTP endpoint configured and verified working

Steps to reproduce

  1. Configure CLAUDE_CODE_USE_FOUNDRY=1 + ANTHROPIC_FOUNDRY_BASE_URL + ANTHROPIC_FOUNDRY_API_KEY.
  2. Configure standard OTEL OTLP export to a working collector.
  3. Launch claude from a terminal and issue several prompts.
  4. 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_request
  • claude_code.api_error
  • claude_code.cost.usage
  • claude_code.token.usage
  • claude_code.tool_decision
  • claude_code.tool_result
  • claude_code.skill_activated

The following events did emit normally:

  • claude_code.session.count
  • claude_code.active_time.total
  • claude_code.mcp_server_connection
  • claude_code.user_prompt
  • claude_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.

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗