Logfire Python Observability SDK for LLM and Agent Tracing
Logfire is Pydantic's observability SDK for Python applications, with first-class tracing for AI, LLM, and agent workloads. It wraps OpenTelemetry, ships with a hosted UI, and supports instrumenting popular Python frameworks without building a custom tracing stack from scratch.
Prerequisites
python, pip, go, rust
Installation
Use the upstream install or setup path that matches your environment:
- pip install logfire
Requirements and caveats from upstream:
- Python-centric Insights: From rich display of Python objects, to event-loop telemetry, to profiling Python code and database queries, Logfire gives you unparalleled visibility into your Python application's behavior.
- OpenTelemetry: Logfire is an opinionated wrapper around OpenTelemetry, allowing you to leverage existing tooling, infrastructure, and instrumentation for many common Python packages, and enabling support for virtu...
Basic usage or getting-started notes:
bash
Authenticate
Extracted from upstream docs: https://raw.githubusercontent.com/pydantic/logfire/HEAD/README.md