Pydantic Logfire is an observability platform built around Pydantic Validation. This repository holds the Python SDK and documentation; the server that stores and displays data is a hosted platform, with self-hosting offered as an enterprise option. TypeScript and Rust SDKs live in separate repositories.
The SDK is an opinionated wrapper around OpenTelemetry. You call logfire.configure() and then either add manual spans and log lines with f-string-style templates, or instrument common packages with one call such as logfire.instrument_fastapi(app). Because the wire format is OpenTelemetry, the same instrumentation and infrastructure apply, the data can be exported to any OTel-compatible backend, and other languages can send data too.
On the platform side, Logfire is oriented toward Python: rich display of Python objects, event-loop telemetry, profiling of Python code and database queries, and built-in analytics on Pydantic model validations. All data is queryable with standard SQL, which also lets existing BI tools and database libraries read it. The product pages position it for LLM apps and agents, including evals in production.
Features
- Manual tracing: logfire.info, logfire.debug, and logfire.span with templated messages and structured attributes
- Integrations: one-line instrumentation for web frameworks (FastAPI and others), database connectors, HTTP libraries, and logging handlers
- OpenTelemetry core: standard traces, metrics, and logs, exportable to any OTel backend
- Python-centric views: object display, event-loop telemetry, and code and query profiling
- Pydantic integration: visibility into data flowing through validation models and validation analytics
- SQL querying: query all telemetry with standard SQL from the dashboard or external tools
- AI observability: LLM, agent, and RAG instrumentation, with Pydantic AI and an AI Gateway in the same product family
- Multi-language SDKs: Python here, TypeScript and Rust in sibling repositories
