Skip to content

otel span exceptions missing error messages #2965

@jcaplan

Description

@jcaplan

Initial Checks

Description

as mentioned in #2925

when I insert an extra span in my toolsetwrapper I can see the error message:

Image

but the running tool span does not show the error message properly:

Image

It seems like the error message should be attached to the "event":

Image

vs.

Image

I think maybe the ToolRetryError should be passing through the error message to super().__init__() here

Example Code

Python, Pydantic AI & LLM client version

- python 3.12.7
- pydantic-ai=1.0.2
- AzureOpenAI client.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions