Logfire
Last updated: Apr 23, 2026
Rationale
We use Pydantic Logfire as the observability platform for our LLM-powered components, replacing the need to maintain a separate provider for AI tracing on top of our general observability stack.
Logfire allows us to achieve the following:
- It provides first-party, one-line instrumentation for Pydantic AI
via
logfire.instrument_pydantic_ai(), built by the same team that maintains Pydantic AI and Pydantic itself. - It is built on OpenTelemetry, so the same SDK that traces the agent also traces FastAPI, the MCP server, Bedrock calls, and the GraphQL client without a separate agent or collector.
- It exposes a Postgres-flavored SQL interface for querying stored traces and logs, so engineers can build arbitrary reports without learning a proprietary query language.
- It supports custom dashboards composed of SQL-backed charts, which we use to monitor agent latency, token usage, guardrail outcomes, tool-call frequency, and throttling retries.
- It includes 10M records/month (spans, logs, and metrics) on every paid plan, with overage billed at $2 per additional million, and a configurable price cap to prevent surprise bills.
- It costs $49 per month on the Team plan (5 seats) and $249 per month on the Growth plan (unlimited seats), which fits our current traffic volume inside the included 10M records.
- It is licensed under the MIT license on the SDK side, and the cloud service is offered in both EU and US data regions.
Alternatives
Below are alternatives we have used or evaluated that were replaced or rejected in favor of Logfire.
LangSmith
LangSmith is the LLM observability platform built by the LangChain team, and the tool we used before migrating to Logfire.
- It provides tracing, online and offline evaluations, prompt hub, playground, and monitoring dashboards out of the box.
- It has no first-party Pydantic AI integration; instrumentation is done through the LangChain/LangSmith SDKs or a generic OpenTelemetry bridge. Since our agents are built on Pydantic AI, every SDK upgrade required re-validating the bridge.
- It uses a proprietary trace model rather than native OpenTelemetry, which complicates correlating agent traces with the rest of our FastAPI and MCP traces.
- Its query and dashboarding UIs are filter-based; there is no SQL interface for building arbitrary reports, so custom analyses require exporting data.
- It is priced per seat plus per trace: $39 per seat per month on the Plus plan with 10k base traces included and $2.50 per additional 1k traces, and a default retention of 14 days (400-day retention costs $5.00 per 1k traces on top).
- At our trace volume and team size, the per-seat-plus-per-trace model was noticeably more expensive than Logfire's flat record-based pricing.
- It is licensed under a proprietary license.
LangSmith was last reviewed on Apr 23, 2026.
Datadog LLM Observability
Datadog LLM Observability is the LLM-specific product inside Datadog, which we already use for platform-wide logs, metrics, and error tracking (see the Datadog ADR).
- It correlates LLM spans with APM and RUM traces, which is valuable for teams that want a single pane across backend, frontend, and AI workloads.
- It offers built-in evaluations for hallucinations, prompt injection, and data leaks, plus cluster visualizations for output drift.
- It has no first-party Pydantic AI integration; agents must be instrumented through Datadog's ddtrace LLM Observability SDK or OpenTelemetry, both of which add custom wiring for every agent component we care about.
- It is billed per LLM span and is activated as a premium add-on on top of existing APM costs. Adding LLM Observability to an account that is already sending LLM spans automatically incurs a substantial additional daily charge, independent of the span count we would actually use.
- Its query layer is Datadog-specific (tag filters and the log search DSL); there is no SQL interface for traces.
- It is licensed under a proprietary license.
Datadog LLM Observability was last reviewed on Apr 23, 2026.
Usage
We use Pydantic Logfire as the observability platform for every component that runs Pydantic AI agents or LLM calls, including:
- Interacts — MCP server and AI Agent (FastAPI, Pydantic AI, MCP tools).
- Matches — LLM-backed matching workflows.
- Fixes — SCA and code-fix agents running as Lambdas.
- Sifts — LLM-assisted triage flows.
- Explores — exploratory agents over platform data.
- Smells — code-smell detection agents.
It is used for:
- Distributed tracing of Pydantic AI agents (main and helper models), guardrail evaluations, tool calls, and downstream HTTP/GraphQL requests.
- Custom dashboards for agent latency, token usage, model throttling retries, and per-session turn counts.
- SQL-based ad-hoc investigations of specific conversations or agent runs, keyed by span attributes.
Error-level logs are still shipped to Datadog for alerting and correlation with the rest of the platform.