-
Notifications
You must be signed in to change notification settings - Fork 439
Open
Labels
bugSomething isn't workingSomething isn't working
Description
I've been working on a prototype and attempted to enable Open Telemetry without success. It seems the SDK Client freezes when receiving a response. Telemetry works fine and the client never freezes if no MCP server is provided in ClaudeAgentOptions.
I'm not sure if this is an issue directly with Claude Code CLI. I've used telemetry with Claude Code in the past but not recently.
Python Version: 3.12.8
Claude Agent SDK Version: 0.1.10
Claude Code CLI Version: 2.0.55
This can be easily replicated with the mcp_calculator.py example:
- Run a basic Open Telemetry collector:
docker run \
-p 127.0.0.1:4317:4317 \
-p 127.0.0.1:4318:4318 \
-p 127.0.0.1:55679:55679 \
otel/opentelemetry-collector-contrib:0.140.0- Run the
mcp_calculator.pyexample with telemetry enabled:
CLAUDE_CODE_ENABLE_TELEMETRY=1 \
OTEL_METRICS_EXPORTER=console,otlp \
OTEL_LOGS_EXPORTER=console,otlp \
OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf \
OTEL_EXPORTER_OTLP_ENDPOINT="http://localhost:4318" \
OTEL_METRIC_EXPORT_INTERVAL=10000 \
OTEL_LOGS_EXPORT_INTERVAL=5000 python mcp_calculator.pyThe process will freeze on the first prompt and will never output any message.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working