api_request, tool_result, user_prompt, api_error, and tool_decision.
RunAgain accepts these at its OTLP logs endpoint (/v1/logs) and turns each
event into a span, grouping every session.id into a single trace.
This captures Claude Code running in your terminal — every session becomes one
trace with its prompts, tool calls, API requests, token usage and cost.
1. Generate an API key
In your project: Overview → onboarding → Claude Code (CLI) → Generate API key (or Settings → Create API key). Copy thesk_… value.
2. Enable telemetry
Add these to your shell profile, or to~/.claude/settings.json under "env":
3. Run Claude Code
What you’ll see
Each session becomes one trace on your Traces page:claude_code.api_request→ a generation span with provideranthropic, the model, input/output/cache tokens, and cost.claude_code.tool_result/tool_decision→ tool spans (failures are marked as errors).claude_code.user_prompt→ the prompt (whenOTEL_LOG_USER_PROMPTS=1).
Cost comes from Claude Code’s own
cost_usd, so it’s accurate regardless of
RunAgain’s pricing table.