Logfire
AI observability platform for production LLM and agent systems.
Last verified:
What is Logfire?
Pydantic Logfire is a production-grade AI and general observability platform built on OpenTelemetry. It provides unified visibility into your entire application stack, including LLM interactions, agent behavior, API requests, database queries, and business logic—all in one platform. Unlike AI monitoring tools that only show LLM calls, Logfire shows the complete picture from request to response, helping you identify the root causes of failures in production AI applications.
Logfire offers first-class SDKs for Python, JavaScript/TypeScript, and Rust, plus support for any language via OpenTelemetry. Key features include complete distributed tracing, real-time cost tracking for LLM APIs, integrated evaluation framework with Pydantic Evals, SQL-based querying with Postgres-compatible syntax, MCP server integration for AI coding assistants, automatic Pydantic model validation insights, and dashboards with custom metrics and SLOs. The platform supports auto-instrumentation for major AI frameworks (Pydantic AI, OpenAI, LangChain, Vercel AI SDK), web frameworks (FastAPI, Django, Next.js), databases (PostgreSQL, MongoDB, Redis), and more.
Logfire is designed for engineering teams building AI applications, LLM-powered agents, RAG systems, and modern polyglot architectures. It is particularly valuable for teams using Python AI backends with TypeScript/JavaScript frontends, microservices in multiple languages, or those working with Vercel's ecosystem. The platform serves developers from local development through production, offering SOC2 Type II certification, HIPAA compliance, GDPR compliance with EU data region, and self-hosting options for enterprise customers.
The tool is built by the same team behind Pydantic Validation, which has over 500 million monthly downloads and is used by OpenAI, Anthropic, and most AI frameworks. Logfire combines the ease of use of Pydantic with the power of OpenTelemetry, making observability accessible without requiring a specialized observability team.
Logfire pricing
Pricing model: Freemium
Logfire offers a free tier with 10 million spans per month indefinitely, no credit card required. Paid plans include Team and Growth plans at $49/month with 10M spans included, then $2 per million spans thereafter. The Team plan includes 500 million spans/metrics per month at $2/million after that limit. Extended data retention is available as an add-on. Enterprise pricing is available on request and includes self-hosting, SSO (e.g., Okta), dedicated Slack channel, invoiced billing, SLA, custom BAA for HIPAA, 1-year contract required, discounts for high volume, configurable retention, and unlimited orgs/projects/users/seats. No host fees, no custom metrics fees, and no ingestion surprises—pricing is based solely on spans.
Logfire pros
- 10 million free spans per month indefinitely with no credit card required
- OpenTelemetry-native with no vendor lock-in and portability to any OTel backend
- First-class SDKs for Python, JavaScript/TypeScript, and Rust with auto-instrumentation
- Unified AI and general observability in one platform—no need for separate tools
- Complete application traces showing LLMs, agents, databases, APIs, and business logic
- SQL-based querying with Postgres-compatible syntax—no new query language to learn
- Real-time LLM API cost tracking with budget alerts and model optimization insights
- Integrated Pydantic Evals framework for continuous production evaluation of LLM outputs
- MCP server integration lets Claude Code, Cursor, and other IDEs query your telemetry
- Native Pydantic integration provides analytics on model validations and data flow
- Live spans that render before they complete for real-time debugging
- SOC2 Type II certified with HIPAA compliance and BAAs available for enterprise
- EU data region option for GDPR compliance and data sovereignty requirements
- Self-hosting available for enterprise customers with strict data residency needs
- Predictable pricing at $2 per million spans with no host fees or ingestion surprises
- Structured logs with automatic redaction for sensitive data
- Works seamlessly with Vercel ecosystem including @vercel/otel and Vercel AI SDK
Logfire cons
- Server application for recording and displaying data is closed source
- Pay $2 per million spans after free tier and paid plan limits are exceeded
- Enterprise features like self-hosting, SSO, and custom retention require sales contact
- 14-day standard data retention on lower tiers (extended retention costs extra)
- Pydantic logfire library enforces log record bodies to be strings (not fully structured)
- Primarily optimized for Python—other languages rely on standard OpenTelemetry
- No dedicated mobile app for monitoring on the go
- Limited pre-built dashboards compared to mature APM tools like Datadog
Frequently asked questions about Logfire
What is Pydantic Logfire?
Pydantic Logfire is a production-grade AI and general observability platform built on OpenTelemetry. It provides unified visibility into your entire application stack, including LLM interactions, agent behavior, API requests, database queries, and business logic. Unlike tools that only monitor LLM calls, Logfire shows complete application traces from request to response, helping you identify the root causes of failures in production AI applications.
Is Logfire free to use?
Yes, Logfire has a free tier that includes 10 million spans per month indefinitely with no credit card required. You can upgrade to Team or Growth plans at any time. The free tier is sufficient for development and small projects, while paid plans start at $49/month for higher volume needs.
What languages does Logfire support?
Logfire offers first-party SDKs for Python, JavaScript/TypeScript, and Rust. The Python SDK is open source under the MIT license. Logfire also supports any language via OpenTelemetry—any framework with OTel instrumentation works automatically without special Logfire integration. This includes Go, Java, C#, and other languages with OpenTelemetry support.
How does Logfire pricing compare to alternatives?
Logfire charges $2 per million spans with no host fees or ingestion surprises. This is significantly cheaper than alternatives at scale: compared to Datadog, Logfire can save 59-87% depending on volume. Compared to LangSmith, Logfire can be 50-100X cheaper at scale (~$6-10 per million traces vs LangSmith's ~$500 per million traces for standard retention).
What is the difference between spans, traces, metrics, and logs?
A span is the atomic unit of telemetry data and building block of a trace. A trace is a tree structure of spans showing the path of a request, LLM run, or API call through your application. A metric is a calculated value measuring your application over time (like latency or error rates). A log is a timestamped text record with no duration, capturing specific events. Together they provide complete observability.
Can I self-host Logfire?
Yes, self-hosting is available for enterprise customers with strict data residency requirements. Industries like Finance, Healthcare, and Legal can use the fully self-hosted enterprise plan. Contact the Logfire team for enterprise pricing which includes self-hosting, SSO, custom retention, SLA, and BAAs.
How does Logfire integrate with Pydantic AI?
Logfire has native integration with Pydantic AI through logfire.instrument_pydantic_ai(). It also has an out-of-the-box Pydantic integration that lets you understand data passing through Pydantic models and get analytics on validations. Combined with Pydantic AI Gateway, you can observe the entire flow from prompt to validated output in one trace.
What AI frameworks does Logfire support?
Logfire supports major AI frameworks including Pydantic AI, OpenAI, Anthropic, Google GenAI, LangChain, LlamaIndex, LiteLLM, Mirascope, and MCP. The Vercel AI SDK has built-in OpenTelemetry support, so it works automatically. Any framework with OTel instrumentation works without special Logfire integration.
Is Logfire compliant with security standards?
Yes, Logfire is SOC2 Type II certified with no exceptions in their report. It is also HIPAA compliant with Business Associate Agreements (BAAs) available for enterprise plans. Pydantic is fully GDPR compliant with an EU data region option for customers who need data kept in the EU.
How do I query my data in Logfire?
Logfire allows you to query your data using full Postgres-flavored SQL, so there's no new query language to learn. You can use JOINs, aggregations, and CTEs for full analytical power. Additionally, the MCP server lets AI coding assistants like Claude Code and Cursor auto-generate SQL queries using natural language, making it easy to drill down into traces.