Our docs got a refresh! Check out the new content and improved navigation. For detailed API reference see our Python SDK docs and TypeScript SDK.
Description
PercivalIntegrations

Pydantic Integration

This guide shows how to instrument Pydantic AI agents with Percival/Patronus by installing the required packages and initializing the instrumentor.

pip install patronus
pip install pydantic_ai
pip install opentelemetry-instrumentation-threading
pip install opentelemetry-instrumentation-asyncio

Once installed, you can import the following instrumentors:

from patronus.integrations.pydantic_ai import PydanticAIIntegrator
from opentelemetry.instrumentation.threading import ThreadingInstrumentor
from opentelemetry.instrumentation.asyncio import AsyncioInstrumentor
 
import patronus
patronus.init(integrations=[PydanticAIIntegrator(), ThreadingInstrumentor(), AsyncioInstrumentor()])

On this page

No Headings