Pydantic Logfire

https://pydantic.dev/logfire

Pydantic Logfire

10M records free every month10M spans, logs, and metrics free every month No card required

The AI observability platform that sees your whole app

Monitor your entire AI application stack, not just the LLM calls. See the model call, the agent's next step, the API request and the database query behind it in one trace. SDKs for Python, JavaScript/TypeScript and Rust, and OpenTelemetry for everything else.

Companies who trust Pydantic Logfire

Boosted.ai, DeepScribe, Airbyte, Evergreen.ai, Fleet AI, Seekr, Polar.sh, Stuut, Alpaca, Motorway, WorkWhile, Sophos, Aignostics, Amboss, Motorola, Epistemix, Nous Research, Pictet, SimpleClub, Tiger Data, Vox Media, ZenHub, Weaviate

Dosu cut agent debugging time 90% and saved $30k a year. Read the case study

SOC 2 Type II · HIPAA · EU data residency · PII scrubbing in the SDK · Self-hosted option Built for the review before the review

The Loop

Trace it. Query it. Improve it.

The Full Picture

The bug is rarely in the prompt

Most teams run one observability tool for the backend and a separate one for the LLM. Production problems hide in the seams between them: a slow vector search that delays context retrieval, an API timeout inside a tool call, a memory leak in a background worker. Logfire keeps the whole request in one trace, so the step that actually failed is on the same screen as the model call that surfaced it.

Start free

A trace like this from your own app in about five minutes.

Evals

Evals that live inside the trace, not in a tool beside it

Airbnb published the clearest public account of evaluating generative AI at scale: read real outputs first, then build evaluators for the failures you actually found, in three layers. Logfire runs all three, and the score lands on the span it scored, beside the database query, the tool call, and the retry that explain it.

01

Programmatic checks

Failures code can identify exactly: malformed JSON, a missing citation, a tool called with the wrong arguments, a response over the length budget. Cheap, deterministic, and they run on every case.

Writing evals

02

LLM judges, one job each

For the qualities code cannot check: is the tone right, does the answer follow from the retrieved context, is it actually responsive to the question. A judge with one narrow job is far more reliable than one asked to grade everything.

Datasets and experiments

03

Human review as ground truth

People settle the disputed cases and calibrate the judges, so you know how far to trust an automated score before you gate a release on it.

Human review

Then close the loop: run the same evaluators offline against a dataset to compare a prompt or model change, and live against production traffic to catch what your dataset never contained; production failures become the next dataset case. And because a score is just an attribute on a span, evals and the rest of your telemetry query together in the same SQL, billed as ordinary records with no per-score fee. Read: Do evals the Airbnb way

Start free

Evals bill as ordinary records, inside the 10M free every month.

FusionFire

Query it like a database, because it is one

Your telemetry answers to Postgres-flavored SQL: joins, aggregations, JSON operators, CTEs. The store behind it is FusionFire: our columnar engine built on Apache DataFusion, shaped for wide, deeply nested traces and attributes nobody indexed in advance.

“We migrated from LangSmith to Logfire and the time it took to query our agent traces went down by 96.2%.”

It is built by people who help build DataFusion: a Pydantic engineer sits on the PMC, and the team has hundreds of contributions across DataFusion and Apache Arrow. When the engine needs to be faster, we fix it upstream.

Your coding agent gets the same interface through the Logfire MCP server, and the same telemetry backs AI gateway controls on every model call.

Try it below on a synthetic records table with the real column names. Start with the slowest spans, then ask what is slow inside an agent run: the answer is the vector search, not the model. Cost is a column too.

Live simulation edit the SQL and run it · synthetic sample data, real column names

SELECT span_name, message, duration FROM records ORDER BY duration DESC LIMIT 5; SELECT child.span_name, round(avg(child.duration)::numeric, 2) AS avg_seconds, count(*) AS calls FROM records child JOIN records root ON child.parent_span_id = root.span_id WHERE root.span_name = 'agent run' AND NOT child.is_exception AND child.start_timestamp > now() - interval '24 hours' GROUP BY child.span_name ORDER BY avg_seconds DESC LIMIT 10; SELECT attributes->>'gen_ai.request.model' AS model, count(*) AS calls, sum((attributes->>'gen_ai.usage.output_tokens')::int) AS output_tokens, round(sum((attributes->>'operation.cost')::numeric), 2) AS usd FROM records WHERE span_name LIKE 'chat %' AND start_timestamp > now() - interval '24 hours' GROUP BY model ORDER BY usd DESC LIMIT 10; SELECT span_name, count(*) FILTER (WHERE is_exception) AS errors, count(*) AS total, max(exception_type) AS exception_type FROM records WHERE start_timestamp > now() - interval '24 hours' GROUP BY span_name HAVING count(*) FILTER (WHERE is_exception) > 0 ORDER BY errors DESC LIMIT 10; SELECT http_route, round((percentile_cont(0.95) WITHIN GROUP (ORDER BY duration))::numeric, 2) AS p95_seconds, count(*) AS requests FROM records WHERE http_route IS NOT NULL AND start_timestamp > now() - interval '24 hours' GROUP BY http_route ORDER BY p95_seconds DESC LIMIT 10;

⌘/Ctrl + Enter runs it too 5 rows

span_namemessageduration
agent runagent run: password reset loop36.3605
agent runagent run: invoice copy34.4753
agent runagent run: missing order34.0831
agent runagent run: invoice copy33.3635
running tool: lookup_orderrunning tool: lookup_order (invoice copy)30
span_nameavg_secondscalls
SELECT documents2.0440
chat claude-sonnet-51.2915
chat gpt-51.2446
running tool: lookup_order0.5014
POST /api/tickets0.2140
running tool: search_docs0.1440
modelcallsoutput_tokensusd
gateway/openai:gpt-546158811.00
gateway/anthropic:claude-sonnet-51567720.24
span_nameerrorstotalexception_type
running tool: lookup_order418TimeoutError
http_routep95_secondsrequests
/api/tickets0.3340

Start free

and run these queries on your own traces.

Integrations

Works with your entire stack

Observability should not require a rewrite. Logfire is built on OpenTelemetry: first-party SDKs for Python, JavaScript/TypeScript, and Rust, and standard OTel for Go, Java, .NET, Ruby, and everything else. A Python backend, a TypeScript frontend, and an edge worker land in the same correlated trace. Already running Datadog or Grafana? OpenTelemetry exports to more than one backend at once, so Logfire runs alongside them with no re-instrumentation.

Python

AI / LLM

Pydantic AI OpenAI Anthropic Google GenAI LangChain LlamaIndex LiteLLM Mirascope MCP

Web Frameworks

FastAPI Django Flask Starlette ASGI WSGI

Databases

PostgreSQL (Psycopg) SQLAlchemy Asyncpg PyMongo Redis MySQL

Other

HTTPX Requests Celery Loguru Structlog Stripe AWS Lambda

JavaScript / TypeScript

Vercel AI SDK ✨ Browser Next.js Express Node.js Deno Cloudflare Workers

✨ Vercel AI SDK has built-in OTel support, so no special integration is needed

Rust

tracing opentelemetry log crate

Built on tracing + OpenTelemetry ecosystem

Any Language via OpenTelemetry

Logfire is built on OpenTelemetry. Any framework with OTel instrumentation works automatically, with no special integration needed. Our listed integrations are convenient wrappers, not requirements.

Go Java .NET Ruby PHP Erlang/Elixir Swift C++

Learn more about using standard OTel →

Five Minutes To First Trace

This code produces this trace

Install the SDK, call logfire.configure(), and instrument your framework in one line. The snippet below is a complete Pydantic AI agent; underneath it is the trace it produced. Click the trace to explore the live view.

Enterprise Ready

Ready for your security review

AI applications process sensitive data, so the observability platform watching them gets reviewed hard. SOC 2, HIPAA BAAs, DPAs, and the subprocessor list are ready before you ask for them.

SOC 2 Type II certified

Independently audited controls. A copy of the report is available on request.

HIPAA compliant

Business Associate Agreements are available on Growth and Enterprise plans.

GDPR-ready, EU data region

DPAs, documented subprocessors, and an EU Data Region for customers whose data must stay in the EU.

Runs where your data lives

Managed cloud, dedicated, or self-hosted on the enterprise plan. The SDKs are open source under MIT; the server is closed source.

Customer Outcomes

Teams that switched, with numbers

96%

cut from agent-trace query time after migrating from LangSmith.

General Intelligence Company · case study

90%

cut from agent debugging time, saving $30k a year.

Dosu · case study

Minutes

to trace an agent's reasoning and fix issues that used to mean digging through huge text logs.

Boosted.ai · case study

Your first trace is five minutes away

pip install logfire, logfire.configure(), and you are live. 10 million spans, logs, and metrics free every month, then $2 per additional million records, with an optional price cap. No credit card required.

Frequently asked questions

How does Logfire help with RAG (Retrieval-Augmented Generation)?

Logfire traces the entire RAG pipeline. You can see the user query, the vector database retrieval latency, the retrieved context chunks, and the final LLM generation on one timeline, so a slow retrieval or an irrelevant chunk is visible next to the generation it fed.

Does Logfire support AI Agents?

Yes. Tool calls, retrieval, and reasoning steps each land as a span with duration, errors, and cost, so you can spot loops, set step-level SLOs, and see exactly which step to optimize.

Is Logfire OpenTelemetry-native?

Yes. Logfire ingests OpenTelemetry signals and preserves OTLP portability, so you can reuse existing instrumentation, forward subsets to your SIEM/warehouse, and avoid vendor lock-in.

How does Logfire handle security, privacy, and PII?

Logfire supports edge redaction through SDKs and collectors, role-based access with SSO, retention controls, and audit logs. For compliance posture, SOC 2, HIPAA, GDPR, and document request details, see the security page.

How does Logfire compare to LangSmith / Langfuse?

LangSmith and Langfuse focus primarily on LLM-layer tracing: prompt management, evaluation, and model behavior analysis. Logfire takes a broader approach: it's built on OpenTelemetry and provides full-stack observability across your entire application, including AI components. If your question is "why did the agent choose that tool?" a prompt-focused tool may help. If it's "why is this request slow, where's the bottleneck, and what's it costing me?", that is what Logfire is built for.

What does it cost? Is it really free?

Logfire's free Personal plan includes 10 million logs/spans/metrics per month with no credit card required. Paid plans start at $49/month (Team) and $249/month (Growth), both with additional records at $2/M above their included allowance; Enterprise is custom-priced with volume discounts. Every paid plan includes a price cap option so there are no surprise bills. See the pricing page for full details.

Can I self-host Logfire?

Logfire's SDKs are open source, but the server application and UI are closed source. For teams with data residency requirements, Logfire offers both EU and US hosting regions, and the Enterprise plan includes self-hosted deployment with dedicated support: it deploys into your Kubernetes cluster with our open-source Helm chart. Contact the team for details.

More on what AI observability is and how it differs from APM: LLM observability, explained

Compare Logfire: LangSmith Langfuse Arize AX Datadog Braintrust Sentry SigNoz all alternatives

{
"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> <div> <p><span>Pydantic Logfire</span></p> <p><span> <strong><span>10M records free every month</span><span>10M spans, logs, and metrics free every month</span></strong> <span>No card required</span> </span> </p></div> <h2>\nThe AI observability platform that sees your whole app\n</h2> <p>\nMonitor your entire AI application stack, not just the LLM calls. See the model call, the agent's next step, the API request and the\n\t\t\t\t\t\t\tdatabase query behind it in one trace. SDKs for Python, JavaScript/TypeScript and Rust, and OpenTelemetry for everything else.\n</p> </div> <div> <p>Companies who trust Pydantic Logfire</p> <figure><p>Boosted.ai, DeepScribe, Airbyte, Evergreen.ai, Fleet AI, Seekr, Polar.sh, Stuut, Alpaca, Motorway, WorkWhile, Sophos, Aignostics, Amboss, Motorola, Epistemix, Nous Research, Pictet, SimpleClub, Tiger Data, Vox Media, ZenHub, Weaviate</p></figure> <p>\nDosu cut agent debugging time 90% and saved $30k a year. <a target=\"_blank\" href=\"https://pydantic.dev/case-studies/dosu\">Read the case study</a> </p> <p>\nSOC 2 Type II · HIPAA · EU data residency · PII scrubbing in the SDK · Self-hosted option <a target=\"_blank\" href=\"https://pydantic.dev/enterprise\">Built for the review before the review</a> </p> </div> <div> <p>The Loop</p> <div> <h2>Trace it. Query it. Improve it.</h2> </div> </div> <div> <p>The Full Picture</p> <div> <h2>The bug is rarely in the prompt</h2> </div> <p>\nMost teams run one observability tool for the backend and a separate one for the LLM. Production problems hide in the seams between them: a slow\n\t\t\t\tvector search that delays context retrieval, an API timeout inside a tool call, a memory leak in a background worker. Logfire keeps the whole\n\t\t\t\trequest in one trace, so the step that actually failed is on the same screen as the model call that surfaced it.\n</p> <div> <a target=\"_blank\" href=\"https://logfire.pydantic.dev/login?intent=signup\"><p><span>Start free</span></p></a> <p><span>A trace like this from your own app in about five minutes.</span> </p></div> </div> <div> <p>Evals</p> <div> <h2>Evals that live inside the trace, not in a tool beside it</h2> </div> <p>\nAirbnb published the clearest public account of evaluating generative AI at scale: read real outputs first, then build evaluators for the\n\t\t\t\tfailures you actually found, in three layers. Logfire runs all three, and the score lands on the span it scored, beside the database query, the\n\t\t\t\ttool call, and the retry that explain it.\n</p> <div> <div> <p>01</p> <h3>Programmatic checks</h3> <p>Failures code can identify exactly: malformed JSON, a missing citation, a tool called with the wrong arguments, a response over the length budget. Cheap, deterministic, and they run on every case.</p> <p><a target=\"_blank\" href=\"https://pydantic.dev/docs/logfire/evaluate/evals/\"> Writing evals </a> </p></div><div> <p>02</p> <h3>LLM judges, one job each</h3> <p>For the qualities code cannot check: is the tone right, does the answer follow from the retrieved context, is it actually responsive to the question. A judge with one narrow job is far more reliable than one asked to grade everything.</p> <p><a target=\"_blank\" href=\"https://pydantic.dev/docs/logfire/evaluate/datasets-and-experiments/\"> Datasets and experiments </a> </p></div><div> <p>03</p> <h3>Human review as ground truth</h3> <p>People settle the disputed cases and calibrate the judges, so you know how far to trust an automated score before you gate a release on it.</p> <p><a target=\"_blank\" href=\"https://pydantic.dev/docs/logfire/evaluate/human-review/\"> Human review </a> </p></div> </div> <p> <strong>Then close the loop:</strong> run the same evaluators offline against a dataset to compare a prompt\n\t\t\t\t\t\t\t\tor model change, and <a target=\"_blank\" href=\"https://pydantic.dev/docs/logfire/evaluate/live-evals/\">\nlive against production traffic\n</a> \nto catch what your dataset never contained; production failures become the next dataset case. And because a score is just an\n\t\t\t\t\t\t\t\tattribute on a span, evals and the rest of your telemetry query together in the same SQL, billed as ordinary records with no\n\t\t\t\t\t\t\t\tper-score fee. <a target=\"_blank\" href=\"https://pydantic.dev/articles/three-layer-evals-logfire\">\nRead: Do evals the Airbnb way\n</a> </p> <div> <a target=\"_blank\" href=\"https://logfire.pydantic.dev/login?intent=signup\"><p><span>Start free</span></p></a> <p><span>Evals bill as ordinary records, inside the 10M free every month.</span> </p></div> </div> <div> <p>FusionFire</p> <div> <h2>Query it like a database, because it is one</h2> </div> <p>\nYour telemetry answers to Postgres-flavored SQL: joins, aggregations, JSON operators, CTEs. The store behind it is <strong>FusionFire</strong>: our columnar engine built on Apache DataFusion, shaped for wide, deeply nested traces and attributes nobody indexed\n\t\t\t\tin advance.\n</p> <blockquote> <p>\n“We migrated from LangSmith to Logfire and the time it took to query our agent traces went down by 96.2%.”\n</p> </blockquote> <p>\nIt is built by people who help build DataFusion: a Pydantic engineer sits on the PMC, and the team has hundreds of contributions across\n\t\t\t\tDataFusion and Apache Arrow. When the engine needs to be faster, <a target=\"_blank\" href=\"https://pydantic.dev/articles/bloom-filter-folding-parquet-logfire\">we fix it upstream</a>.\n</p> <p>\nYour coding agent gets the same interface through the <a href=\"https://pydantic.dev/articles/logfire-mcp-is-awesome\" target=\"_blank\">Logfire MCP server</a>, and the same telemetry backs <a target=\"_blank\" href=\"https://pydantic.dev/logfire/ai-gateway\">AI gateway controls</a> on every model call.\n</p> <p>\nTry it below on a synthetic <code>records</code> table with the real column names. Start with the slowest spans, then ask what is slow inside an agent\n\t\t\t\trun: the answer is the vector search, not the model. Cost is a column too.\n</p> <div> <p><span> \nLive simulation\n</span> <span>edit the SQL and run it · synthetic sample data, real column names</span> </p> <span>SELECT</span> span_name, message, duration\n<span>FROM</span> records\n<span>ORDER</span> <span>BY</span> duration <span>DESC</span>\nLIMIT <span>5</span>;\n<span>SELECT</span> child.span_name,\n round(<span>avg</span>(child.duration)::<span>numeric</span>, <span>2</span>) <span>AS</span> avg_seconds,\n <span>count</span>(<span>*</span>) <span>AS</span> calls\n<span>FROM</span> records child\n<span>JOIN</span> records root <span>ON</span> child.parent_span_id <span>=</span> root.span_id\n<span>WHERE</span> root.span_name <span>=</span> <span>'agent run'</span>\n <span>AND</span> <span>NOT</span> child.is_exception\n <span>AND</span> child.start_timestamp <span>&gt;</span> now() <span>-</span> <span>interval</span> <span>'24 hours'</span>\n<span>GROUP</span> <span>BY</span> child.span_name\n<span>ORDER</span> <span>BY</span> avg_seconds <span>DESC</span>\nLIMIT <span>10</span>;\n<span>SELECT</span> attributes<span>-</span><span>&gt;&gt;</span><span>'gen_ai.request.model'</span> <span>AS</span> model,\n <span>count</span>(<span>*</span>) <span>AS</span> calls,\n <span>sum</span>((attributes<span>-</span><span>&gt;&gt;</span><span>'gen_ai.usage.output_tokens'</span>)::<span>int</span>) <span>AS</span> output_tokens,\n round(<span>sum</span>((attributes<span>-</span><span>&gt;&gt;</span><span>'operation.cost'</span>)::<span>numeric</span>), <span>2</span>) <span>AS</span> usd\n<span>FROM</span> records\n<span>WHERE</span> span_name <span>LIKE</span> <span>'chat %'</span>\n <span>AND</span> start_timestamp <span>&gt;</span> now() <span>-</span> <span>interval</span> <span>'24 hours'</span>\n<span>GROUP</span> <span>BY</span> model\n<span>ORDER</span> <span>BY</span> usd <span>DESC</span>\nLIMIT <span>10</span>;\n<span>SELECT</span> span_name,\n <span>count</span>(<span>*</span>) <span>FILTER</span> (<span>WHERE</span> is_exception) <span>AS</span> errors,\n <span>count</span>(<span>*</span>) <span>AS</span> total,\n <span>max</span>(exception_type) <span>AS</span> exception_type\n<span>FROM</span> records\n<span>WHERE</span> start_timestamp <span>&gt;</span> now() <span>-</span> <span>interval</span> <span>'24 hours'</span>\n<span>GROUP</span> <span>BY</span> span_name\n<span>HAVING</span> <span>count</span>(<span>*</span>) <span>FILTER</span> (<span>WHERE</span> is_exception) <span>&gt;</span> <span>0</span>\n<span>ORDER</span> <span>BY</span> errors <span>DESC</span>\nLIMIT <span>10</span>;\n<span>SELECT</span> http_route,\n round((<span>percentile_cont</span>(<span>0.95</span>) <span>WITHIN</span> <span>GROUP</span> (<span>ORDER</span> <span>BY</span> duration))::<span>numeric</span>, <span>2</span>) <span>AS</span> p95_seconds,\n <span>count</span>(<span>*</span>) <span>AS</span> requests\n<span>FROM</span> records\n<span>WHERE</span> http_route <span>IS</span> <span>NOT NULL</span>\n <span>AND</span> start_timestamp <span>&gt;</span> now() <span>-</span> <span>interval</span> <span>'24 hours'</span>\n<span>GROUP</span> <span>BY</span> http_route\n<span>ORDER</span> <span>BY</span> p95_seconds <span>DESC</span>\nLIMIT <span>10</span>;\n <p> <span>⌘/Ctrl + Enter runs it too</span> <span>5 rows</span> </p> <div> <div> <table> <thead> <tr> <th>span_name</th><th>message</th><th>duration</th> </tr> </thead> <tbody> <tr> <td>agent run</td><td>agent run: password reset loop</td><td>36.3605</td> </tr><tr> <td>agent run</td><td>agent run: invoice copy</td><td>34.4753</td> </tr><tr> <td>agent run</td><td>agent run: missing order</td><td>34.0831</td> </tr><tr> <td>agent run</td><td>agent run: invoice copy</td><td>33.3635</td> </tr><tr> <td>running tool: lookup_order</td><td>running tool: lookup_order (invoice copy)</td><td>30</td> </tr> </tbody> </table> </div><div> <table> <thead> <tr> <th>span_name</th><th>avg_seconds</th><th>calls</th> </tr> </thead> <tbody> <tr> <td>SELECT documents</td><td>2.04</td><td>40</td> </tr><tr> <td>chat claude-sonnet-5</td><td>1.29</td><td>15</td> </tr><tr> <td>chat gpt-5</td><td>1.24</td><td>46</td> </tr><tr> <td>running tool: lookup_order</td><td>0.50</td><td>14</td> </tr><tr> <td>POST /api/tickets</td><td>0.21</td><td>40</td> </tr><tr> <td>running tool: search_docs</td><td>0.14</td><td>40</td> </tr> </tbody> </table> </div><div> <table> <thead> <tr> <th>model</th><th>calls</th><th>output_tokens</th><th>usd</th> </tr> </thead> <tbody> <tr> <td>gateway/openai:gpt-5</td><td>46</td><td>15881</td><td>1.00</td> </tr><tr> <td>gateway/anthropic:claude-sonnet-5</td><td>15</td><td>6772</td><td>0.24</td> </tr> </tbody> </table> </div><div> <table> <thead> <tr> <th>span_name</th><th>errors</th><th>total</th><th>exception_type</th> </tr> </thead> <tbody> <tr> <td>running tool: lookup_order</td><td>4</td><td>18</td><td>TimeoutError</td> </tr> </tbody> </table> </div><div> <table> <thead> <tr> <th>http_route</th><th>p95_seconds</th><th>requests</th> </tr> </thead> <tbody> <tr> <td>/api/tickets</td><td>0.33</td><td>40</td> </tr> </tbody> </table> </div> </div> </div> <div> <a target=\"_blank\" href=\"https://logfire.pydantic.dev/login?intent=signup\"><p><span>Start free</span></p></a> <p><span>and run these queries on your own traces.</span> </p></div> </div> <div> <p>Integrations</p> <div> <h2>Works with your entire stack</h2> </div> <p>\nObservability should not require a rewrite. Logfire is built on OpenTelemetry: first-party SDKs for Python, JavaScript/TypeScript, and Rust, and\n\t\t\t\tstandard OTel for Go, Java, .NET, Ruby, and everything else. A Python backend, a TypeScript frontend, and an edge worker land in the same\n\t\t\t\tcorrelated trace. Already running Datadog or Grafana? OpenTelemetry exports to more than one backend at once, so Logfire runs alongside them\n\t\t\t\twith no re-instrumentation.\n</p> <section> <section> <h3 id=\"logfire-integrations-python\"> <span> <svg width=\"16\" height=\"16\"> </svg> </span>\nPython\n</h3> <section> <h4>AI / LLM</h4> <p> <a href=\"https://pydantic.dev/docs/logfire/integrations/llms/pydanticai/\" target=\"_blank\"> Pydantic AI </a> <a href=\"https://pydantic.dev/docs/logfire/integrations/llms/openai/\" target=\"_blank\"> OpenAI </a> <a href=\"https://pydantic.dev/docs/logfire/integrations/llms/anthropic/\" target=\"_blank\"> Anthropic </a> <a href=\"https://pydantic.dev/docs/logfire/integrations/llms/google-genai/\" target=\"_blank\"> Google GenAI </a> <a href=\"https://pydantic.dev/docs/logfire/integrations/llms/langchain/\" target=\"_blank\"> LangChain </a> <a href=\"https://pydantic.dev/docs/logfire/integrations/llms/llamaindex/\" target=\"_blank\"> LlamaIndex </a> <a href=\"https://pydantic.dev/docs/logfire/integrations/llms/litellm/\" target=\"_blank\"> LiteLLM </a> <a href=\"https://pydantic.dev/docs/logfire/integrations/llms/mirascope/\" target=\"_blank\"> Mirascope </a> <a href=\"https://pydantic.dev/docs/logfire/integrations/llms/mcp/\" target=\"_blank\"> MCP </a> </p> </section> <section> <h4>Web Frameworks</h4> <p> <a href=\"https://pydantic.dev/docs/logfire/integrations/web-frameworks/fastapi/\" target=\"_blank\"> FastAPI </a> <a href=\"https://pydantic.dev/docs/logfire/integrations/web-frameworks/django/\" target=\"_blank\"> Django </a> <a href=\"https://pydantic.dev/docs/logfire/integrations/web-frameworks/flask/\" target=\"_blank\"> Flask </a> <a href=\"https://pydantic.dev/docs/logfire/integrations/web-frameworks/starlette/\" target=\"_blank\"> Starlette </a> <a href=\"https://pydantic.dev/docs/logfire/integrations/web-frameworks/asgi/\" target=\"_blank\"> ASGI </a> <a href=\"https://pydantic.dev/docs/logfire/integrations/web-frameworks/wsgi/\" target=\"_blank\"> WSGI </a> </p> </section> <section> <h4>Databases</h4> <p> <a href=\"https://pydantic.dev/docs/logfire/integrations/databases/psycopg/\" target=\"_blank\"> PostgreSQL (Psycopg) </a> <a href=\"https://pydantic.dev/docs/logfire/integrations/databases/sqlalchemy/\" target=\"_blank\"> SQLAlchemy </a> <a href=\"https://pydantic.dev/docs/logfire/integrations/databases/asyncpg/\" target=\"_blank\"> Asyncpg </a> <a href=\"https://pydantic.dev/docs/logfire/integrations/databases/pymongo/\" target=\"_blank\"> PyMongo </a> <a href=\"https://pydantic.dev/docs/logfire/integrations/databases/redis/\" target=\"_blank\"> Redis </a> <a href=\"https://pydantic.dev/docs/logfire/integrations/databases/mysql/\" target=\"_blank\"> MySQL </a> </p> </section> <section> <h4>Other</h4> <p> <a href=\"https://pydantic.dev/docs/logfire/integrations/http-clients/httpx/\" target=\"_blank\"> HTTPX </a> <a href=\"https://pydantic.dev/docs/logfire/integrations/http-clients/requests/\" target=\"_blank\"> Requests </a> <a href=\"https://pydantic.dev/docs/logfire/integrations/event-streams/celery/\" target=\"_blank\"> Celery </a> <a href=\"https://pydantic.dev/docs/logfire/integrations/logging/loguru/\" target=\"_blank\"> Loguru </a> <a href=\"https://pydantic.dev/docs/logfire/integrations/logging/structlog/\" target=\"_blank\"> Structlog </a> <a href=\"https://pydantic.dev/docs/logfire/integrations/stripe/\" target=\"_blank\"> Stripe </a> <a href=\"https://pydantic.dev/docs/logfire/integrations/aws-lambda/\" target=\"_blank\"> AWS Lambda </a> </p> </section> </section> <section> <section> <h3 id=\"logfire-integrations-javascript\"> <span> <svg width=\"16\" height=\"16\"> </svg> </span>\nJavaScript / TypeScript\n</h3> <p> <a href=\"https://pydantic.dev/docs/logfire/guides/alternative-clients/\" target=\"_blank\" title=\"Works automatically via built-in OpenTelemetry support\">Vercel AI SDK ✨</a> <a href=\"https://pydantic.dev/docs/logfire/instrument/typescript/packages/browser/\" target=\"_blank\"> Browser </a> <a href=\"https://pydantic.dev/docs/logfire/instrument/typescript/frameworks/nextjs/\" target=\"_blank\"> Next.js </a> <a href=\"https://pydantic.dev/docs/logfire/instrument/typescript/frameworks/express/\" target=\"_blank\"> Express </a> <a href=\"https://pydantic.dev/docs/logfire/instrument/typescript/packages/node/\" target=\"_blank\"> Node.js </a> <a href=\"https://pydantic.dev/docs/logfire/instrument/typescript/frameworks/deno/\" target=\"_blank\"> Deno </a> <a href=\"https://pydantic.dev/docs/logfire/instrument/typescript/packages/cloudflare/\" target=\"_blank\"> Cloudflare Workers </a> </p> <p>✨ Vercel AI SDK has built-in OTel support, so no special integration is needed</p> </section> <section> <h3 id=\"logfire-integrations-rust\"> <span> <svg width=\"16\" height=\"16\"> </svg> </span>\nRust\n</h3> <p> <a href=\"https://github.com/pydantic/logfire-rust\" target=\"_blank\"> tracing </a> <a href=\"https://github.com/pydantic/logfire-rust\" target=\"_blank\"> opentelemetry </a> <a href=\"https://github.com/pydantic/logfire-rust\" target=\"_blank\"> log crate </a> </p> <p>Built on tracing + OpenTelemetry ecosystem</p> </section> </section> <section> <h3 id=\"logfire-integrations-otel\"> <span> <svg width=\"16\" height=\"16\"> </svg> </span>\nAny Language via OpenTelemetry\n</h3> <p>\nLogfire is built on OpenTelemetry. <strong>Any framework with OTel instrumentation works automatically, with no special integration needed.</strong> Our listed integrations are convenient\n\t\t\twrappers, not requirements.\n</p> <p> <span>Go</span> <span>Java</span> <span>.NET</span> <span>Ruby</span> <span>PHP</span> <span>Erlang/Elixir</span> <span>Swift</span> <span>C++</span> </p> <p> <a href=\"https://pydantic.dev/docs/logfire/guides/alternative-clients/\" target=\"_blank\">Learn more about using standard OTel →</a> </p> </section> </section> </div> <div> <p>Five Minutes To First Trace</p> <div> <h2>This code produces this trace</h2> </div> <p>\nInstall the SDK, call <code>logfire.configure()</code>, and instrument your framework in one line. The snippet below is a complete Pydantic AI\n\t\t\t\tagent; underneath it is the trace it produced. Click the trace to explore the live view.\n</p> </div> <div> <p>Enterprise Ready</p> <h2>Ready for your security review</h2> <p>\nAI applications process sensitive data, so the observability platform watching them gets reviewed hard. SOC 2, HIPAA BAAs, DPAs, and the\n\t\t\t\tsubprocessor list are ready before you ask for them.\n</p> <div> <div> <h3>SOC 2 Type II certified</h3> <p>Independently audited controls. A copy of the report is available on request.</p> </div> <div> <h3>HIPAA compliant</h3> <p>Business Associate Agreements are available on Growth and Enterprise plans.</p> </div> <div> <h3>GDPR-ready, EU data region</h3> <p>\nDPAs, documented subprocessors, and an EU <a href=\"https://pydantic.dev/docs/logfire/manage/data-regions/\" target=\"_blank\">Data Region</a> \nfor customers whose data must stay in the EU.\n</p> </div> <div> <h3>Runs where your data lives</h3> <p>\nManaged cloud, dedicated, or self-hosted on the enterprise plan. The SDKs are open source under MIT; the server is closed source.\n</p> </div> </div> </div> <div> <p>Customer Outcomes</p> <div> <h2>Teams that switched, with numbers</h2> </div> <div> <div> <p>96%</p> <p>cut from agent-trace query time after migrating from LangSmith.</p> <p> General Intelligence Company · <a target=\"_blank\" href=\"https://pydantic.dev/case-studies/gic\">\ncase study\n</a> </p> </div><div> <p>90%</p> <p>cut from agent debugging time, saving $30k a year.</p> <p> Dosu · <a target=\"_blank\" href=\"https://pydantic.dev/case-studies/dosu\">\ncase study\n</a> </p> </div><div> <p>Minutes</p> <p>to trace an agent's reasoning and fix issues that used to mean digging through huge text logs.</p> <p> Boosted.ai · <a target=\"_blank\" href=\"https://pydantic.dev/case-studies/boostedai\">\ncase study\n</a> </p> </div> </div> </div> <div> <h2>Your first trace is five minutes away</h2> <p> <code>pip install logfire</code>, <code>logfire.configure()</code>, and you are live. 10 million spans, logs, and metrics free every month, then\n\t\t\t\t$2 per additional million records, with an optional price cap. No credit card required.\n</p> </div> <div> <h2>Frequently asked questions</h2> <div> <details> <summary> <span>How does Logfire help with RAG (Retrieval-Augmented Generation)?</span> </summary> <p>Logfire traces the entire RAG pipeline. You can see the user query, the vector database retrieval latency, the retrieved context chunks, and the final LLM generation on one timeline, so a slow retrieval or an irrelevant chunk is visible next to the generation it fed.</p> </details><details> <summary> <span>Does Logfire support AI Agents?</span> </summary> <p>Yes. Tool calls, retrieval, and reasoning steps each land as a span with duration, errors, and cost, so you can spot loops, set step-level SLOs, and see exactly which step to optimize.</p> </details><details> <summary> <span>Is Logfire OpenTelemetry-native?</span> </summary> <p>Yes. Logfire ingests OpenTelemetry signals and preserves OTLP portability, so you can reuse existing instrumentation, forward subsets to your SIEM/warehouse, and avoid vendor lock-in.</p> </details><details> <summary> <span>How does Logfire handle security, privacy, and PII?</span> </summary> <p>Logfire supports edge redaction through SDKs and collectors, role-based access with SSO, retention controls, and audit logs. For compliance posture, SOC 2, HIPAA, GDPR, and document request details, see the <a target=\"_blank\" href=\"https://pydantic.dev/security\">security page</a>.</p> </details><details> <summary> <span>How does Logfire compare to LangSmith / Langfuse?</span> </summary> <p>LangSmith and Langfuse focus primarily on LLM-layer tracing: prompt management, evaluation, and model behavior analysis. Logfire takes a broader approach: it's built on OpenTelemetry and provides full-stack observability across your entire application, including AI components. If your question is \"why did the agent choose that tool?\" a prompt-focused tool may help. If it's \"why is this request slow, where's the bottleneck, and what's it costing me?\", that is what Logfire is built for.</p> </details><details> <summary> <span>What does it cost? Is it really free?</span> </summary> <p>Logfire's free Personal plan includes 10 million logs/spans/metrics per month with no credit card required. Paid plans start at $49/month (Team) and $249/month (Growth), both with additional records at $2/M above their included allowance; Enterprise is custom-priced with volume discounts. Every paid plan includes a price cap option so there are no surprise bills. See the <a target=\"_blank\" href=\"https://pydantic.dev/pricing\">pricing page</a> for full details.</p> </details><details> <summary> <span>Can I self-host Logfire?</span> </summary> <p>Logfire's SDKs are open source, but the server application and UI are closed source. For teams with data residency requirements, Logfire offers both EU and US hosting regions, and the Enterprise plan includes self-hosted deployment with dedicated support: it deploys into your Kubernetes cluster with our open-source Helm chart. Contact the team for details.</p> </details> </div> <p>\nMore on what AI observability is and how it differs from APM: <a target=\"_blank\" href=\"https://pydantic.dev/logfire/llm-observability\">LLM observability, explained</a> </p> <p>\nCompare Logfire: <a target=\"_blank\" href=\"https://pydantic.dev/logfire/vs-langsmith\">LangSmith</a> <a target=\"_blank\" href=\"https://pydantic.dev/logfire/vs-langfuse\">Langfuse</a> <a target=\"_blank\" href=\"https://pydantic.dev/logfire/vs-arize\">Arize AX</a> <a target=\"_blank\" href=\"https://pydantic.dev/logfire/vs-datadog\">Datadog</a> <a target=\"_blank\" href=\"https://pydantic.dev/logfire/vs-braintrust\">Braintrust</a> <a target=\"_blank\" href=\"https://pydantic.dev/logfire/vs-sentry\">Sentry</a> <a target=\"_blank\" href=\"https://pydantic.dev/logfire/vs-signoz\">SigNoz</a> <a target=\"_blank\" href=\"https://pydantic.dev/logfire/alternatives\">all alternatives</a> </p> </div> </div>",
"author": "",
"favicon": "https://pydantic.dev/favicon/favicon.ico",
"source": "pydantic.dev",
"published": "",
"ttr": 360,
"type": ""
}