How to use Claude Code OpenTelemetry monitoring
- Enable telemetry
export CLAUDE_CODE_ENABLE_TELEMETRY=1
- Choose what to export
export OTEL_METRICS_EXPORTER=otlp export OTEL_LOGS_EXPORTER=otlp
- Configure your OpenTelemetry collector
export OTEL_EXPORTER_OTLP_PROTOCOL=grpc export OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4317
- Add authentication if required
export OTEL_EXPORTER_OTLP_HEADERS="Authorization=Bearer your-token"
- Start Claude Code
claude

Seonglae Cho