This integration is currently in beta. If you encounter any issues or unexpected behavior, please reach out for feedback and support.
Lunary supports Pydantic AI through OpenTelemetry instrumentation via Logfire.To integrate Pydantic AI with Lunary, you only need to configure the OpenTelemetry exporter and instrument Pydantic AI:
Copy
os.environ["OTEL_EXPORTER_OTLP_ENDPOINT"] = "https://api.lunary.ai" # replace by your api endpoint if you're self-hosting Lunaryos.environ["OTEL_EXPORTER_OTLP_HEADERS"] = f"Authorization=Bearer {os.environ['LUNARY_PRIVATE_KEY']}"logfire.configure(send_to_logfire=False)logfire.instrument_pydantic_ai()