Skip to content

feat: Added Missing Attributes For Arize & Phoenix Integration (#10043) #10215

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

Merged
merged 1 commit into from
Apr 23, 2025

Conversation

ishaan-jaff
Copy link
Contributor

@ishaan-jaff ishaan-jaff commented Apr 23, 2025

Title

This is a contributor PR


I've added the missing attributes for Arize & Phoenix integration.

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)[https://docs.litellm.ai/docs/extras/contributing_code]
  • My PR's scope is as isolated as possible, it only solves 1 specific problem

Type

🆕 New Feature
🧹 Refactoring
✅ Test

Changes

  • I've added the missing OpenInference span attributes to improve visibility with Arize & Phoenix dashboards.
  • I've added detailed LLM request/response metadata capture, including model provider, tools, function parameters, exceptions, along with other LLM attributes.
  • I've added helper functions, such as cast_as_primitive_value_type() to ensure OTEL compliance, and safe_set_attribute() to avoid tracing runtime errors.
  • I've updated a unit test test_arize_set_attributes() for verifying all span attributes are correctly set.
  • I've added inline comments across sections for better code readability and maintenance.
  • I've validated integration with both Arize and Phoenix, confirming full trace visibility and attribute ingestion.

Integration Tests
litellm-test

Arize Traces
litellm-arize

Phoenix Traces
litellm-phoenix

* feat: Added Missing Attributes For Arize & Phoenix Integration

* chore: Added noqa for PLR0915 to suppress warning

* chore: Moved Contributor Test to Correct Location

* chore: Removed Redundant Fallback
Copy link

vercel bot commented Apr 23, 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 Apr 23, 2025 1:27am

@CLAassistant
Copy link

CLAassistant commented Apr 23, 2025

CLA assistant check
All committers have signed the CLA.

@ishaan-jaff ishaan-jaff merged commit 96e31d2 into main Apr 23, 2025
39 of 44 checks passed
crisshaker pushed a commit to crisshaker/litellm that referenced this pull request Apr 23, 2025
…AI#10043) (BerriAI#10215)

* feat: Added Missing Attributes For Arize & Phoenix Integration

* chore: Added noqa for PLR0915 to suppress warning

* chore: Moved Contributor Test to Correct Location

* chore: Removed Redundant Fallback

Co-authored-by: Ali Saleh <[email protected]>
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.

3 participants