Skip to main content
Trace Claude Code CLI sessions, tool usage, and token costs with Arize AX for full observability.
Claude Code is Anthropic’s agentic coding tool that lives in your terminal. The Arize Claude Code Plugin instruments sessions using 9 hook events and sends OpenInference spans to Arize AX. Traces can be viewed in Arize.

Launch Arize

To get started, sign up for a free Arize account and get your Space ID and API Key:
  1. Log in at app.arize.com
  2. Click Settings (gear icon) → copy the Space ID from the Space Settings page
  3. Go to the API Keys tab → click Create API Key or copy an existing one

Install

Install the Claude Code plugin from the Arize marketplace:
claude plugin marketplace add Arize-ai/arize-claude-code-plugin
claude plugin install claude-code-tracing@arize-claude-plugin
Start Claude Code
cd your-project
claude
Use the guided setup command inside Claude Code:
/setup-claude-code-tracing
Screenshot2026 02 27at12 31 21PM

Restart Claude Code

Restart Claude Code for tracing to take effect:
claude

Observe

Now that you have tracing setup, all Claude Code sessions will be streamed to your Arize account for observability and evaluation. You’ll see:
  • Turn traces — each conversation turn (user prompt → assistant response)
  • LLM spans — Claude’s responses with model info and token counts
  • Tool spans — nested spans for each tool call with inputs, outputs, and duration
  • Subagent spans — activity from any subagents Claude spawns
  • Session grouping — all turns from the same session grouped by session_id

Hooks Captured

HookCaptured Data
SessionStartSession ID, project name, timestamps
UserPromptSubmitTrace ID, prompt preview, transcript position
PreToolUseTool ID, start time
PostToolUseTool name, input, output, duration, metadata
StopModel, token counts, input/output text
SubagentStopAgent type, model, token counts, output
NotificationTitle, message, notification type
PermissionRequestPermission type, tool name
SessionEndTrace count, tool count

Troubleshooting

ProblemFix
Traces not appearingCheck ARIZE_TRACE_ENABLED is "true" and API key / Space ID are correct
”Python with opentelemetry not found”Run pip install opentelemetry-proto grpcio
No output in terminalHook stderr is discarded; check /tmp/arize-claude-code.log
Want to test without sendingSet ARIZE_DRY_RUN to "true"
Want verbose loggingSet ARIZE_VERBOSE to "true"

Uninstall

claude plugin remove arize-claude-plugin

Resources