Skip to content

[bug] Incomplete spans exported to Phoenix after upgrading pydantic-ai from 0.8.1 to 1.0.0 #2224

@mridul-aiXbrain

Description

@mridul-aiXbrain

Describe the bug
After upgrading pydantic-ai from 0.8.1 to 1.0.x, spans exported to Phoenix via openinference-instrumentation-pydantic-ai become incomplete.

  • With pydantic-ai==0.8.1 + openinference-instrumentation-pydantic-ai==0.1.5, spans look correct (instructions, user prompts, model info, tool calls, etc.).
  • With pydantic-ai>=1.0.0 + the same instrumentation, spans degrade:
    • Some attributes are missing (instructions, tool call details, etc.).
    • Overall trace structure is much less informative compared to <1.0.0.

To Reproduce
pydantic-ai==1.0.10
openinference-instrumentation-pydantic-ai==0.1.5
arize-phoenix-otel==0.13.1
opentelemetry-sdk==1.37.0

self hosted phoenix v11.32.1

  1. Run Phoenix locally with self-hosted setup
  2. Connect Phoenix to a pydantic-ai Agent with OpenAIResponsesModel
  3. Add a tool to the agent
  4. Get agent response using agent.run_stream()
  5. Verify the span in Phoenix UI

Expected behavior
with pydantic-ai >= 1.0.0, spans should not degrade.

Screenshots
with pydantic v0.8.1
Image

with pydantic-ai >= v1.0.0
Image

Desktop (please complete the following information):

  • OS: Ubuntu
  • Version 22.04
  • Python 3.11.7

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions