Skip to content

feat: Add Tracing Support For Anthropic/Claude Code With Arize/Phoenix Integration #12987

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

ialisaleh
Copy link
Contributor

Title

This pull request adds tracing support for Anthropic/Claude Code in the LiteLLM Proxy, integrating with Arize/Phoenix for enhanced observability.

Relevant issues

None

Pre-Submission checklist

Please complete all items before asking a LiteLLM maintainer to review your PR

  • I have Added testing in the tests/litellm/ directory, Adding at least 1 test is a hard requirement - see details
  • I have added a screenshot of my new test passing locally
  • My PR passes all unit tests on make test-unit
  • My PR's scope is as isolated as possible, it only solves 1 specific problem

Type

🆕 New Feature

Changes

  • I have added multiple spans to represent internal Claude Code prompts and a final output span for end-to-end visibility.

  • I have integrated proper JSON detection and rendering for structured Claude outputs.

  • I have ensured the span ordering, which reflects logical execution.

  • I have improved observability for Arize/Phoenix integrations by capturing internal reasoning steps for debugging and monitoring.

Anthropic / Claude Code Trace - Internal Prompt

LiteLLM-Proxy-Anthropic-Claude-Code-1

Anthropic / Claude Code Trace - Final Output

LiteLLM-Proxy-Anthropic-Claude-Code-2

Copy link

vercel bot commented Jul 25, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
litellm ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 25, 2025 5:52pm

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do we need custom handling here? @ialisaleh

the message payload across api's is already standardized to the standard logging payload format, which would then be emitted to all integrations

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants