Installation
Setup
What Gets Traced
The Anthropic instrumentation automatically captures:- Messages: Model, system prompt, messages, parameters
- Streaming: Real-time token streaming
- Tool Use: Tool definitions, tool calls, results
- Token Usage: Input and output token counts
- Errors: API errors, rate limits, validation errors
Advanced Examples
Streaming Responses
Tool Use (Function Calling)
System Prompts and Multi-turn Conversations
Observability in Phoenix
Once instrumented, you can:- View all Claude API calls with full message history
- Monitor token usage for cost tracking
- Track response latency and streaming performance
- Inspect tool use patterns and tool call sequences
- Debug system prompts and conversation context
- Analyze error patterns and rate limiting
Resources
Example Messages
Basic message example
Tool Calling Example
Multiple tool calls
OpenInference Package
View source code
Anthropic Documentation
Official API docs