Pydantic Logfire

https://pydantic.dev/logfire

Full-stack observability and evaluation for AI apps

With Pydantic Logfire, traces find the problem, evals prove a change fixed it, and rollouts ship the fix without a deploy.

From the team behind Pydantic Validation

  • +60K GitHub stars
  • 1BN+ monthly downloads

Trusted by every good Python developer, all FAANG companies and 20 of the 25 largest companies on NASDAQ.

Workflow

Loop engineering

  • Observe

    See the model call, the tool it used and the query underneath, all in one trace.

    Learn more
  • Evaluate

    Know whether a change made things better, with numbers, not vibes.

    Learn more
  • Optimize

    Change a prompt, swap a model or roll a change back, without a deploy.

    Learn more

Architecture

However you built it, everything lands in one place

Native SDKs for Python, TypeScript and Rust. Standard OpenTelemetry for everything else. It all arrives in the same table, so one Postgres-compatible SQL query can span a trace, an eval result and a prompt version.

Key features

Everything you need to keep shipping

  • MCP & coding agents

    Your coding agent queries production in SQL, so it debugs from what happened, not from guesses.

    Read the guide
  • Dashboards & alerts

    Dashboards out of the box and alerts on anything you can query: from an eval score slipping to a p99 doubling to spend spiking.

    See how alerts work
  • Integrations & OpenTelemetry

    Native SDKs for Python, TypeScript and Rust, standard OTel for everything else, including hosts and Kubernetes.

    Find your framework
  • Cost tracking & sampling

    See what every model and agent costs, then keep every error and slow trace and sample the rest.

    Track your LLM costs
  • AI Gateway

    One endpoint, one key, every model, with spend caps per key, per person and per project.

    How the Gateway works
  • Feature flags & managed variables

    Change prompts, model settings or any Pydantic model without a redeploy. OpenFeature-compatible.

    See managed variables

Pricing

10m spans a month, free forever

Then metered on what you send. No per-host fee, no per-seat charge for sending data, and no minimum commitment.

Start for free See full pricing

  • Personal Free 10m spans a month, three projects
  • Team and Growth Metered on volume, SSO, more retention
  • Enterprise Single-tenant or self-hosted, BAA available

Alternatives

Compare Logfire with

FAQs

What is AI observability, and why does it matter?

Standard monitoring tells you something failed. AI observability tells you why by tracing, debugging, and evaluating AI applications across LLM calls, the databases and tools they depend on, the costs and latencies they generate, and the outputs they produce. It matters because AI applications fail in ways traditional software doesn't: a model returns a plausible but wrong answer, a tool call misfires silently, costs spike from a retry loop. Without observability across the full-stack, you’re guessing and shipping AI you can’t debug. Logfire gives you the complete picture.

What is Logfire?

Logfire is a full-stack observability and evaluation platform for AI agents, built on OpenTelemetry and framework-agnostic. It traces the whole run from LLM calls, tool calls, database queries, APIs, and your own code, in one view, so you can debug, evaluate, and improve what your AI does in production. It's built by the team behind Pydantic, the most widely used data-validation library in Python, but neither Pydantic nor Python is required to use it.

Do I need to use Pydantic AI, or Python, to use Logfire?

No to both. Logfire is framework-agnostic and language-agnostic. It ingests standard OpenTelemetry, so it works with OpenAI, Anthropic, LangChain, LangGraph, LlamaIndex, CrewAI, the Vercel AI SDK, and any other stack that emits OTel. TypeScript and Node.js are first-class, with SDKs for Node, the browser, Next.js, and Cloudflare Workers, and any language with an OpenTelemetry SDK works, including Go, Java, .NET, Ruby, and Rust. Pydantic AI has the tightest integration because it's built by the same team, but it's a recommendation, not a requirement.

Does Logfire do evals, or just tracing?

Both. Logfire includes a full evaluation suite: build datasets from production traces, run experiments comparing a candidate against a baseline case by case, score with code assertions, LLM-as-a-judge rubrics, or human review, and run live evals against production traffic. Because eval results are stored as queryable telemetry, "did version 12 regress on refund questions" is a SQL query. Evaluation and observability share the same data, rather than being separate tools.

How is Logfire different from LangSmith, Langfuse, Braintrust, or Arize?

Two differences. First, Logfire is OpenTelemetry-native: the SDK is standard OTel, not a proprietary wrapper, so your instrumentation is portable from day one and the same code can send traces to Logfire or any OTel backend without changes. Second, Logfire traces your full application, not just the LLM layer. You see the database queries, tool calls, and API requests around your model calls in one unified view, so you don't run one tool for your app and another for your AI.

Can my coding agent query production telemetry?

Yes. Logfire stores traces as queryable data in standard PostgreSQL SQL, and its MCP server lets a coding agent like Claude Code or Cursor query production directly — asking why a call failed, which step was slow, what changed — so it debugs from what actually happened instead of guessing. Standard SQL and OpenTelemetry mean the agent doesn't have to learn a proprietary query language.

Can I self-host Logfire?

Yes. Self-hosting is available on the Enterprise plan, deployed in your own infrastructure. If you'd rather not use the hosted platform on other plans, the SDK is standard OpenTelemetry, so you can send your data to any OTel-compatible backend. Either way your instrumentation stays portable. OpenTelemetry is the anti-lock-in standard.

Is Logfire open source?

The Logfire SDK is open source under the MIT license and available on GitHub. It's a wrapper around the OpenTelemetry Python and TypeScript SDKs, so you can inspect it, fork it, or send data to any OTel-compatible backend. The hosted platform is the commercial product; the instrumentation you install is open.

Get started with Logfire for free

Sign up today and see your first trace in under 2 minutes

$ uv add logfire
Resolved 7 packages in 128ms
Installed 7 packages in 89ms
+ logfire
import logfire
logfire.configure()
logfire.info('Hello {name}', name='world')

Free up to 10m spans per month No credit card needed

{
"by": "ellieh",
"descendants": 79,
"id": 40212490,
"kids": [
40212723,
40218832,
40219139,
40215351,
40216559,
40214627,
40214032,
40214699,
40215008,
40216537,
40216536,
40214894
],
"score": 146,
"time": 1714492570,
"title": "Pydantic Logfire",
"type": "story",
"url": "https://pydantic.dev/logfire"
}
{
"author": null,
"date": null,
"description": "Pydantic Logfire: Production-grade AI & general observability built on OpenTelemetry. Works with Python, JavaScript/TypeScript, Rust, Go, Java, and any OTel-compatible language. For LLMs, Agents, API & Apps. Distributed tracing, evals & cost tracking",
"image": "https://pydantic.dev/logfire/opengraph-image.jpg",
"logo": null,
"publisher": "Pydantic",
"title": "Pydantic Logfire: AI Observability for LLMs, Apps & RAG",
"url": "https://pydantic.dev/logfire"
}
{
"url": "https://pydantic.dev/logfire",
"title": "Pydantic Logfire: AI Observability for LLMs, Apps & RAG",
"description": "Pydantic Logfire: Production-grade AI & general observability built on OpenTelemetry. Works with Python, JavaScript/TypeScript, Rust, Go, Java, and any OTel-compatible language. For LLMs, Agents, API & Apps. Distributed tracing, evals & cost tracking",
"links": [
"https://pydantic.dev/logfire"
],
"image": "https://pydantic.dev/logfire/opengraph-image.jpg",
"content": "<div> <div> <h2>Full-stack observability and evaluation for AI apps</h2> <p>With Pydantic Logfire, traces find the problem, evals prove a change fixed it, and rollouts ship the fix without a deploy.</p> </div> <section> <div> <div> <p>From the team behind Pydantic Validation</p> <ul> <li><details> <summary> +60K GitHub stars </summary> </details></li><li>1BN+ monthly downloads</li> </ul> </div> <p>Trusted by every good Python developer, all FAANG companies and 20 of the 25 largest companies on NASDAQ.</p> </div> <ul> <li> <svg> </svg><svg> </svg><svg> </svg><svg> </svg> </li><li> <svg> </svg><svg> </svg><svg> </svg><svg> </svg> </li><li> <svg> </svg><svg> </svg><svg> </svg><svg> </svg> </li><li> <svg> </svg><svg> </svg><svg> </svg><svg> </svg> </li><li> <svg> </svg><svg> </svg><svg> </svg><svg> </svg> </li><li> <svg> </svg><svg> </svg><svg> </svg> </li> </ul> </section> <div> <div> <p> Workflow </p> <h2>Loop engineering</h2> </div> <ul> <li> <div> <div> <p> </p><h3>Observe</h3> <p></p> <p>See the model call, the tool it used and the query underneath, all in one trace.</p> </div> <a target=\"_blank\" href=\"https://pydantic.dev/logfire/llm-observability?experiment-logfire-journey-redesign-2026-09-entry=1\"> <span>Learn more</span> </a> </div> </li><li> <div> <div> <p> </p><h3>Evaluate</h3> <p></p> <p>Know whether a change made things better, with numbers, not vibes.</p> </div> <a target=\"_blank\" href=\"https://pydantic.dev/logfire/evals?experiment-logfire-journey-redesign-2026-09-entry=1\"> <span>Learn more</span> </a> </div> </li><li> <div> <div> <p> </p><h3>Optimize</h3> <p></p> <p>Change a prompt, swap a model or roll a change back, without a deploy.</p> </div> <a target=\"_blank\" href=\"https://pydantic.dev/logfire/prompt-optimization?experiment-logfire-journey-redesign-2026-09-entry=1\"> <span>Learn more</span> </a> </div> </li> </ul> </div> <div> <p> Architecture </p> <div> <h2>However you built it, everything lands in one place</h2> <p>Native SDKs for Python, TypeScript and Rust. Standard OpenTelemetry for everything else. It all arrives in the same table, so one Postgres-compatible SQL query can span a trace, an eval result and a prompt version.</p> </div> <ul> <li> <a target=\"_blank\" href=\"https://pydantic.dev/docs/logfire/integrations/llms/\"> <span>26+ agent frameworks</span> </a> </li> <li> <a target=\"_blank\" href=\"https://pydantic.dev/docs/logfire/integrations/\"> <span>37+ integrations</span> </a> </li> <li> <a target=\"_blank\" href=\"https://pydantic.dev/docs/logfire/\"> <span>3 native SDKs</span> </a> </li> </ul> </div> <section> <div> <p> Key features </p> <h2>Everything you need to keep shipping</h2> </div> <div> <ul> <li> <img src=\"https://pydantic.dev/assets/logfire/features/feature-mcp.webp\" /> <div> <h3>MCP &amp; coding agents</h3> <p>Your coding agent queries production in SQL, so it debugs from what happened, not from guesses.</p> </div> <a target=\"_blank\" href=\"https://pydantic.dev/articles/logfire-mcp-is-awesome\"> <span>Read the guide</span> </a> </li><li> <img src=\"https://pydantic.dev/assets/logfire/features/feature-dashboards.webp\" /> <div> <h3>Dashboards &amp; alerts</h3> <p>Dashboards out of the box and alerts on anything you can query: from an eval score slipping to a p99 doubling to spend spiking.</p> </div> <a target=\"_blank\" href=\"https://pydantic.dev/docs/logfire/observe/alerts/\"> <span>See how alerts work</span> </a> </li><li> <img src=\"https://pydantic.dev/assets/logfire/features/feature-integrations.webp\" /> <div> <h3>Integrations &amp; OpenTelemetry</h3> <p>Native SDKs for Python, TypeScript and Rust, standard OTel for everything else, including hosts and Kubernetes.</p> </div> <a target=\"_blank\" href=\"https://pydantic.dev/docs/logfire/integrations/\"> <span>Find your framework</span> </a> </li><li> <img src=\"https://pydantic.dev/assets/logfire/features/feature-cost.webp\" /> <div> <h3>Cost tracking &amp; sampling</h3> <p>See what every model and agent costs, then keep every error and slow trace and sample the rest.</p> </div> <a target=\"_blank\" href=\"https://pydantic.dev/docs/logfire/cookbook/track-llm-cost/\"> <span>Track your LLM costs</span> </a> </li><li> <img src=\"https://pydantic.dev/assets/logfire/features/feature-gateway.webp\" /> <div> <h3>AI Gateway</h3> <p>One endpoint, one key, every model, with spend caps per key, per person and per project.</p> </div> <a target=\"_blank\" href=\"https://pydantic.dev/docs/logfire/manage/ai-gateway/\"> <span>How the Gateway works</span> </a> </li><li> <img src=\"https://pydantic.dev/assets/logfire/features/feature-flags.webp\" /> <div> <h3>Feature flags &amp; managed variables</h3> <p>Change prompts, model settings or any Pydantic model without a redeploy. OpenFeature-compatible.</p> </div> <a target=\"_blank\" href=\"https://pydantic.dev/docs/logfire/manage/managed-variables/\"> <span>See managed variables</span> </a> </li> </ul> </div> </section> <section> <div> <p> Pricing </p> <div> <h2>10m spans a month, free forever</h2> <p>Then metered on what you send. No per-host fee, no per-seat charge for sending data, and no minimum commitment.</p> </div> <p> <a target=\"_blank\" href=\"https://pydantic.dev/signup\"> <span>Start for free</span> </a> <a target=\"_blank\" href=\"https://pydantic.dev/pricing\"> <span>See full pricing</span> </a> </p> </div> <ul> <li> <span> <span>Personal</span> <span>Free</span> </span> <span>10m spans a month, three projects</span> </li><li> <span> <span>Team and Growth</span> </span> <span>Metered on volume, SSO, more retention</span> </li><li> <span> <span>Enterprise</span> </span> <span>Single-tenant or self-hosted, BAA available</span> </li> </ul> </section> <section> <div> <p> Alternatives </p> <h2>Compare Logfire with</h2> </div> <div> <ul> <li> <a target=\"_blank\" href=\"https://pydantic.dev/logfire/vs-braintrust\"> <span> <span>Logfire vs</span> <span>Braintrust</span> </span> <span>Full-stack production improvement with $0 scores</span> </a> </li><li> <a target=\"_blank\" href=\"https://pydantic.dev/logfire/vs-langsmith\"> <span> <span>Logfire vs</span> <span>LangSmith</span> </span> <span>50-100x cheaper at scale</span> </a> </li><li> <a target=\"_blank\" href=\"https://pydantic.dev/logfire/vs-langfuse\"> <span> <span>Logfire vs</span> <span>Langfuse</span> </span> <span>Full-stack vs LLM-only observability</span> </a> </li><li> <a target=\"_blank\" href=\"https://pydantic.dev/logfire/vs-arize\"> <span> <span>Logfire vs</span> <span>Arize AX</span> </span> <span>App observability vs ML monitoring</span> </a> </li><li> <a target=\"_blank\" href=\"https://pydantic.dev/logfire/vs-datadog\"> <span> <span>Logfire vs</span> <span>Datadog</span> </span> <span>Agent traces without per-host pricing</span> </a> </li><li> <a target=\"_blank\" href=\"https://pydantic.dev/logfire/vs-sentry\"> <span> <span>Logfire vs</span> <span>Sentry</span> </span> <span>Whole-run tracing vs error monitoring</span> </a> </li><li> <a target=\"_blank\" href=\"https://pydantic.dev/logfire/vs-signoz\"> <span> <span>Logfire vs</span> <span>SigNoz</span> </span> <span>OpenTelemetry with AI built in</span> </a> </li><li> <a target=\"_blank\" href=\"https://pydantic.dev/logfire/vs-grafana\"> <span> <span>Logfire vs</span> <span>Grafana</span> </span> <span>Plain SQL vs three query languages</span> </a> </li> </ul> </div> </section> <section> <p> FAQs </p> <div> <details> <summary> <span>What is AI observability, and why does it matter?</span> </summary> <p>Standard monitoring tells you something failed. AI observability tells you why by tracing, debugging, and evaluating AI applications across LLM calls, the databases and tools they depend on, the costs and latencies they generate, and the outputs they produce. It matters because AI applications fail in ways traditional software doesn't: a model returns a plausible but wrong answer, a tool call misfires silently, costs spike from a retry loop. Without observability across the full-stack, you’re guessing and shipping AI you can’t debug. Logfire gives you the complete picture.</p> </details><details> <summary> <span>What is Logfire?</span> </summary> <p>Logfire is a full-stack observability and evaluation platform for AI agents, built on OpenTelemetry and framework-agnostic. It traces the whole run from LLM calls, tool calls, database queries, APIs, and your own code, in one view, so you can debug, evaluate, and improve what your AI does in production. It's built by the team behind Pydantic, the most widely used data-validation library in Python, but neither Pydantic nor Python is required to use it.</p> </details><details> <summary> <span>Do I need to use Pydantic AI, or Python, to use Logfire?</span> </summary> <p>No to both. Logfire is framework-agnostic and language-agnostic. It ingests standard OpenTelemetry, so it works with OpenAI, Anthropic, LangChain, LangGraph, LlamaIndex, CrewAI, the Vercel AI SDK, and any other stack that emits OTel. TypeScript and Node.js are first-class, with SDKs for Node, the browser, Next.js, and Cloudflare Workers, and any language with an OpenTelemetry SDK works, including Go, Java, .NET, Ruby, and Rust. Pydantic AI has the tightest integration because it's built by the same team, but it's a recommendation, not a requirement.</p> </details><details> <summary> <span>Does Logfire do evals, or just tracing?</span> </summary> <p>Both. Logfire includes a full evaluation suite: build datasets from production traces, run experiments comparing a candidate against a baseline case by case, score with code assertions, LLM-as-a-judge rubrics, or human review, and run live evals against production traffic. Because eval results are stored as queryable telemetry, \"did version 12 regress on refund questions\" is a SQL query. Evaluation and observability share the same data, rather than being separate tools.</p> </details><details> <summary> <span>How is Logfire different from LangSmith, Langfuse, Braintrust, or Arize?</span> </summary> <p>Two differences. First, Logfire is OpenTelemetry-native: the SDK is standard OTel, not a proprietary wrapper, so your instrumentation is portable from day one and the same code can send traces to Logfire or any OTel backend without changes. Second, Logfire traces your full application, not just the LLM layer. You see the database queries, tool calls, and API requests around your model calls in one unified view, so you don't run one tool for your app and another for your AI.</p> </details><details> <summary> <span>Can my coding agent query production telemetry?</span> </summary> <p>Yes. Logfire stores traces as queryable data in standard PostgreSQL SQL, and its MCP server lets a coding agent like Claude Code or Cursor query production directly — asking why a call failed, which step was slow, what changed — so it debugs from what actually happened instead of guessing. Standard SQL and OpenTelemetry mean the agent doesn't have to learn a proprietary query language.</p> </details><details> <summary> <span>Can I self-host Logfire?</span> </summary> <p>Yes. Self-hosting is available on the Enterprise plan, deployed in your own infrastructure. If you'd rather not use the hosted platform on other plans, the SDK is standard OpenTelemetry, so you can send your data to any OTel-compatible backend. Either way your instrumentation stays portable. OpenTelemetry is the anti-lock-in standard.</p> </details><details> <summary> <span>Is Logfire open source?</span> </summary> <p>The Logfire SDK is open source under the MIT license and available on GitHub. It's a wrapper around the OpenTelemetry Python and TypeScript SDKs, so you can inspect it, fork it, or send data to any OTel-compatible backend. The hosted platform is the commercial product; the instrumentation you install is open.</p> </details> </div> </section> <section> <div> <h2>Get started with Logfire for free</h2> <p>Sign up today and see your first trace in under 2 minutes</p> </div> <div> <div> <pre><code><span>$ </span>uv add logfire\n<span>Resolved 7 packages in 128ms</span>\n<span>Installed 7 packages in 89ms</span>\n<span>+ logfire</span></code></pre> </div><div> <pre><code><span>import</span> logfire\nlogfire.configure()\nlogfire.info(<span>'Hello {name}'</span>, name=<span>'world'</span>)</code></pre> </div> </div> <p> <span>Free up to 10m spans per month</span> <span>No credit card needed</span> </p> </section> </div>",
"author": "",
"favicon": "https://pydantic.dev/favicon/favicon.ico",
"source": "pydantic.dev",
"published": "",
"ttr": 222,
"type": ""
}