Skip to content

Commit 53f01a9

Browse files
Fix Pydantic AI docs: update class docstring with correct install command, parameter name, and attribute
- Change install command to include [pydantic_ai] extra - Change result_type to output_type in example - Change result.data to result.output in example This ensures the docstring matches the current Pydantic AI API and correct installation instructions.
1 parent bd0b816 commit 53f01a9

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

sentry_sdk/integrations/pydantic_ai/__init__.py

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,40 @@
1616

1717

1818
class PydanticAIIntegration(Integration):
19+
"""
20+
Integration for Pydantic AI.
21+
22+
This integration instruments Pydantic AI agents to capture traces and errors.
23+
24+
Example:
25+
Install the integration:
26+
27+
.. code-block:: bash
28+
29+
pip install sentry-sdk[pydantic_ai]
30+
31+
Configure the integration:
32+
33+
.. code-block:: python
34+
35+
import sentry_sdk
36+
from sentry_sdk.integrations.pydantic_ai import PydanticAIIntegration
37+
38+
sentry_sdk.init(
39+
dsn="your-dsn",
40+
integrations=[PydanticAIIntegration()],
41+
)
42+
43+
Use Pydantic AI:
44+
45+
.. code-block:: python
46+
47+
from pydantic_ai import Agent
48+
49+
agent = Agent("test", output_type=SupportResponse)
50+
result = await agent.run("Hello")
51+
print(result.output)
52+
"""
1953
identifier = "pydantic_ai"
2054
origin = f"auto.ai.{identifier}"
2155

0 commit comments

Comments
 (0)