/Pydantic Logfire/Pydantic Logfire

The Unreasonable Cost Effectiveness of Pydantic LogfirePydantic Logfire 令人难以置信的性价比

6 mins6 分钟

The observability market is currently split in two. On one side: general-purpose platforms like Datadog, Grafana, and Honeycomb, built for traditional infrastructure and application monitoring. On the other: a new crop of "AI observability" tools - LangSmith, Langfuse, Arize - purpose-built for LLM workflows.当前可观测性市场分为两大阵营。一边是通用平台,如 Datadog、Grafana 和 Honeycomb,专为传统基础设施和应用监控而构建。另一边是新兴的"AI 可观测性"工具——LangSmith、Langfuse、Arize——专为 LLM 工作流而设计。

We think this bifurcation is temporary.我们认为这种分化是暂时的。

Just as we no longer talk about "cloud observability" as a separate category (it's just observability), LLM support will eventually be table stakes. Teams will want one place for everything - their APIs, their databases, their agents, their evals - rather than context-switching between a general-purpose platform and a specialist AI tool. The vendors who win that future will be the ones engineers trusted first on their AI workflows.正如我们不再将"云可观测性"视为独立类别(它就是可观测性),LLM 支持最终将成为标配。团队希望在一个地方管理所有内容——他们的 API、数据库、智能体、评估——而不是在通用平台和专业 AI 工具之间来回切换。赢得未来的供应商将是那些工程师在 AI 工作流中首先信任的平台。

That's the bet behind Logfire's pricing. We're not optimizing to extract maximum revenue from AI observability in 2026. We're pricing to become the platform teams reach for across their entire stack - which means making it genuinely affordable to instrument everything, now, so that trust compounds over time.这就是 Logfire 定价策略背后的赌注。我们并非为了从 2026 年的 AI 可观测性中榨取最大收入而优化定价。我们的定价目标是成为团队在整个技术栈中首选的平台——这意味着让全面埋点真正负担得起,从而随着时间的推移积累信任。

Monitoring AI applications is nothing like monitoring a traditional web service - but not in the way you might expect. AI-only observability tools are scoped to trace LLM-specific operations: the model call, the retrieval steps, the eval scores. Everything else in your application - the HTTP layer, database queries, background workers - goes uninstrumented. That narrow scope is a structural constraint: these platforms ingest only a fraction of the telemetry a general-purpose platform would collect from the same application.监控 AI 应用与监控传统 Web 服务截然不同——但并非如你所想的那样。纯 AI 可观测性工具的范围仅限于追踪 LLM 特定操作:模型调用、检索步骤、评估分数。应用中的其他一切——HTTP 层、数据库查询、后台工作人员——都未被埋点。这种狭窄的范围是一种结构性限制:这些平台仅从同一应用中摄取通用平台会收集的遥测数据的一小部分。

What makes that fraction expensive is payload size. Each span in an LLM trace carries outsized data: system prompts, retrieved document chunks, full model completions - often tens of kilobytes per span versus the sub-kilobyte payloads typical of REST API calls. AI observability vendors face a structural challenge: low ingestion volumes mean they need to charge more per span to sustain their businesses, and several add a separate data-volume charge on top to recover storage costs.使这一小部分变得昂贵的是负载大小。LLM 追踪中的每个 span 都承载着超大数据:系统提示词、检索到的文档块、完整的模型输出——通常每个 span 达数十 KB,而典型的 REST API 调用负载则不足 1 KB。AI 可观测性供应商面临结构性挑战:低摄取量意味着他们需要对每个 span 收取更高费用以维持业务,而且其中几家还额外收取单独的数据量费用以弥补存储成本。

This creates a surprisingly high-stakes procurement decision. The billing unit your vendor chooses - spans, traces, gigabytes, or some proprietary blend - interacts with your workload in ways the headline monthly fee completely obscures. We ran the numbers.这创造了一个令人惊讶的高风险采购决策。供应商选择的计费单位——span、trace、GB 或某种专有组合——与你的工作负载的交互方式完全被 headline 月费所掩盖。我们跑了下数字。

Before comparing prices, you need to understand what each vendor is actually charging for.在比较价格之前,你需要了解每个供应商实际收取的是什么费用。

Spans are the atomic unit of OpenTelemetry: a single timed operation. A single user request in an agentic or RAG application might generate a handful of spans or hundreds, depending on complexity - but each carries much larger payloads than you'd see in a conventional web service trace. We use 25 spans per trace as a modelling assumption throughout this comparison.Span 是 OpenTelemetry 的原子单位:一个单独的计时操作。智能体或 RAG 应用中的单个用户请求可能产生几个到数百个 span,具体取决于复杂程度——但每个 span 的负载都比传统 Web 服务追踪中的大得多。我们在整个比较中使用每个 trace 25 个 span 作为建模假设。

Traces group all the spans for a single request into one logical container. Billing by trace penalizes complexity - a 50-step autonomous agent costs the same as a single LLM call if you're billed per span, but 50× more if you're billed per trace.Trace 将单个请求的所有 span 分组到一个逻辑容器中。按 trace 计费会惩罚复杂性——如果按 span 计费,50 步自主智能体的成本与单次 LLM 调用相同,但如果按 trace 计费,则成本高出 50 倍。

Langfuse Billable Units are an aggregate of traces + spans + evaluation scores. A 10-span trace with one automated eval score costs 12 billable units.Langfuse 可计费单位是 trace + span + 评估分数的聚合。一个包含 10 个 span 的 trace 加上一个自动评估分数,成本为 12 个可计费单位。

Arize adds a second axis: both span count and raw data volume in GB. RAG applications that log large context windows get hit twice.Arize 增加了第二个维度:span 数量和原始数据量(GB)。记录大上下文窗口的 RAG 应用会被双重收费。

To make this concrete, we modeled three realistic scenarios using consistent assumptions: 25 spans per trace, 5 KB per span average payload, and 1 eval score per trace for Langfuse unit calculations.为了具体说明,我们用一致的假设建模了三种现实场景:每个 trace 25 个 span,每个 span 平均负载 5 KB,Langfuse 单位计算中每个 trace 1 个评估分数。

You can explore the full numbers in this Google Sheet.你可以在这个 Google 表格中查看完整数据。

Logfire Arize AX Pro Langfuse LangSmith
Billing model Spans ($2/1M) Spans + GB ($10/1M + $3 per GB) Proprietary units (graduated) Seats + Traces ($39/seat + $2.50/1K traces)
1 user, 5M spans/mo $0 $99 $451 $514
5 users, 50M spans/mo $129 $999 $3,451 $5,170
20 users, 500M spans/mo $1,229 $12,249 $36,801 $50,755

The gap is not marginal. At moderate production scale (5 users, 50M spans), Logfire is 8× less expensive than Arize, 27× less expensive than Langfuse, and 40× less expensive than LangSmith.差距并非微不足道。在中等生产规模下(5 个用户,5000 万 span),Logfire 比 Arize 便宜 8 倍,比 Langfuse 便宜 27 倍,比 LangSmith 便宜 40 倍。

LangSmith's free Developer tier locks you to one user and 5,000 traces per month. The moment you add a second engineer, you're on the Plus plan at $39 per seat per month. Five engineers costs $195 before you've ingested a single trace.LangSmith 的免费 Developer 套餐限制为 1 个用户和每月 5,000 个 trace。一旦添加第二名工程师,你就得使用 Plus 套餐,每月每席位 39 美元。五名工程师在摄取单个 trace 之前就要花费 195 美元。

The trace-based overage pricing compounds the damage. At 50M spans (2M traces at 25 spans per trace), the overage alone exceeds $4,900. Data retention defaults to just 14 days; extending to 400 days doubles your per-trace cost.基于 trace 的超额定价加剧了损害。在 5000 万 span(200 万 trace,按每个 trace 25 个 span 计算)时,仅超额费用就超过 4,900 美元。数据保留默认仅为 14 天;延长至 400 天会使每个 trace 的成本翻倍。

The practical consequence: LangSmith customers routinely sample down to 0.1% of their actual traffic to keep costs manageable. For AI applications, where failures are probabilistic and context-dependent edge cases, sampling away 99.9% of your telemetry defeats the entire purpose of having observability.实际后果是:LangSmith 客户通常将实际流量采样降至 0.1% 以控制成本。对于 AI 应用而言,故障是概率性的且与上下文相关的边缘情况,丢弃 99.9% 的遥测数据完全违背了拥有可观测性的初衷。

See our full Logfire vs LangSmith comparison.查看我们完整的 Logfire 与 LangSmith 对比。

Langfuse's Core plan ($29/mo) looks reasonable until you factor in how quickly the included 100,000 billable units are consumed. Because every trace, span, and evaluation score is counted separately, a 10-span trace with one eval score costs 12 units. A 5M span workload requires roughly 6M units - consuming the included allowance in under a day of moderate traffic.Langfuse 的 Core 套餐(29 美元/月)看起来合理,直到你考虑到包含的 100,000 个可计费单位被消耗得有多快。因为每个 trace、span 和评估分数都单独计算,一个包含 10 个 span 的 trace 加上一个评估分数就要花费 12 个单位。500 万 span 的工作量大约需要 600 万单位——在中等流量下不到一天就用完了包含的额度。

Overage pricing is graduated ($8.00 → $6.00 per 100K units), but the absolute numbers climb steeply. At 50M spans across a 5-person team, the monthly bill reaches $3,451.超额定价是逐级递减的(8.00 美元 → 6.00 美元/10 万单位),但绝对数字攀升迅速。5 人团队在 5000 万 span 的情况下,月账单达到 3,451 美元。

Self-hosting avoids the per-unit cost but introduces serious infrastructure overhead. Real-world deployments have required 500+ vCPUs to handle moderate ingestion volumes, turning the "free" option into a five-figure AWS bill plus dedicated DevOps time.自托管避免了按单位收费,但引入了严重的基础设施开销。实际部署需要 500 多个 vCPU 来处理中等摄取量,将"免费"选项变成了五位数的 AWS 账单加上专门的 DevOps 时间。

See our full Logfire vs Langfuse comparison.查看我们完整的 Logfire 与 Langfuse 对比。

Arize's dual-axis model charges $10 per million spans over the limit and $3 per GB of payload. For simple applications this is manageable. For any application logging prompts and completions in full, it's punishing.Arize 的双轴模型对超出限制的每百万 span 收取 10 美元,对每 GB 负载收取 3 美元。对于简单应用来说这还可以管理。对于任何完整记录提示词和输出的应用来说,这是毁灭性的。

A 50M span workload generates roughly 250 GB of telemetry at 5 KB per span. The Pro plan includes 100 GB; the remaining 150 GB costs $450 in data overages on top of the span overages. Data retention is capped at 15 days on the Pro tier.5000 万 span 的工作量按每个 span 5 KB 计算,大约产生 250 GB 遥测数据。Pro 套餐包含 100 GB;剩余的 150 GB 在 span 超额费用之外还要额外收取 450 美元的数据超额费用。Pro 套餐的数据保留上限为 15 天。

More insidiously, this model creates a perverse incentive: developers start truncating prompt and completion logging to avoid gigabyte charges. When the model hallucinates in production, the trace that might have explained why has been deliberately stripped of the context that caused the problem.更隐蔽的是,这种模式创造了一种扭曲的激励:开发者开始截断提示词和输出记录以避免 GB 费用。当模型在生产环境中产生幻觉时,本可以解释原因的 trace 已被故意剥离了导致问题的上下文。

See our full Logfire vs Arize AX Pro comparison.查看我们完整的 Logfire 与 Arize AX Pro 对比。

Logfire charges $2.00 per million spans, flat. No per-trace multiplier. No gigabyte surcharge. Seat limits vary by plan tier, but overage costs are driven purely by span volume - not by headcount.Logfire 按每百万 span 2.00 美元统一收费。没有按 trace 的乘数。没有 GB 附加费。席位限制因套餐等级而异,但超额费用完全由 span 数量驱动——而非人数。

The free Personal plan covers 10M spans per month for a solo developer with a hard cap to prevent bill shock. The Team plan ($49/mo) adds overage billing at the same flat rate. The Growth plan ($249/mo) removes seat limits entirely, making it practical to give engineers, product managers, and data scientists access without triggering a procurement review each time.免费的 Personal 套餐为个人开发者每月覆盖 1000 万 span,设有硬上限以防止账单冲击。Team 套餐(49 美元/月)以相同的统一费率添加超额计费。Growth 套餐(249 美元/月)完全取消席位限制,让工程师、产品经理和数据科学家无需每次触发采购审批即可获得访问权限。

Because the marginal cost of a span is $0.000002, organizations can afford full 100% ingestion. No sampling. No truncation. When something breaks, the trace is complete.因为单个 span 的边际成本为 0.000002 美元,组织可以负担 100% 完整摄取。无需采样。无需截断。当出现问题时,trace 是完整的。

This pricing is also a direct consequence of how Logfire is built. The platform is built on Apache DataFusion, giving us a high-performance query engine without the operational overhead of running a large external database cluster. The infrastructure cost of processing a span is genuinely low, which is why we can charge genuinely low prices and still build a sustainable business.这种定价也是 Logfire 构建方式的直接结果。该平台基于 Apache DataFusion 构建,为我们提供了高性能查询引擎,而无需运行大型外部数据库集群的运营开销。处理单个 span 的基础设施成本确实很低,这就是为什么我们可以收取真正低廉的价格,同时仍然建立可持续的业务。

The longer-term vision matters here too. As AI functionality becomes table stakes in every application, teams will consolidate their observability tooling. The platform that earns trust on AI workflows today - by being affordable enough to instrument everything, and reliable enough to trust at scale - is the one that earns the right to monitor the rest of the stack tomorrow. That's why we price the way we do.长期愿景在这里也很重要。随着 AI 功能成为每个应用的标配,团队将整合他们的可观测性工具。今天在 AI 工作流中赢得信任的平台——通过足够实惠以全面埋点,以及足够可靠以规模化信任——将赢得明天监控其余技术栈的权利。这就是我们这样定价的原因。

The headline monthly fee of an observability platform is almost irrelevant. What matters is the billing primitive and how it interacts with your actual workload.可观测性平台的 headline 月费几乎无关紧要。重要的是计费原语及其与实际工作负载的交互方式。

  • Trace-based billing (LangSmith) collapses under agentic workloads where one user action generates dozens of spans.基于 trace 的计费(LangSmith)在智能体工作负载下会崩溃,因为单个用户操作会生成数十个 span。
  • Proprietary unit blending (Langfuse) hides a multiplier effect that accelerates spend faster than the raw numbers suggest.专有单位混合(Langfuse)隐藏了加速支出的乘数效应,比原始数字暗示的更快。
  • Dual-axis volume pricing (Arize) actively punishes RAG architectures and incentivizes the kind of telemetry truncation that makes debugging impossible.双轴容量定价(Arize)主动惩罚 RAG 架构,并激励那种使调试成为不可能的遥测截断行为。
  • Flat span pricing (Logfire) aligns cost directly with application load, stays predictable at every scale, and never creates incentives to discard the data you actually need.统一 span 定价(Logfire)使成本直接与应用程序负载对齐,在任何规模下都保持可预测,且永远不会创造丢弃你实际所需数据的激励。

If you're building production AI applications and paying more than $2 per million spans for observability, it's worth running the numbers for your own workload. Start here.如果你正在构建生产级 AI 应用,并且为可观测性支付的费用超过每百万 span 2 美元,那么值得为你自己的工作负载算一笔账。 从这里开始。