Back to Blog

LLM Application Costs: Where They Come From and How to Monitor Them

Your model bill grows faster than your traffic and nothing shows you why. Break the cost of one answer into its parts, learn the four numbers your provider will never give you, and see what the layer that measures them costs: Langfuse in the cloud or on your own infrastructure.

Sebastian Tekieli

Chief AI Agents Officer and software engineer

LinkedIn
Developerarchitecture24 min read

The first month with a language model in production usually costs about as much as coffee for the team. The third month can cost as much as a salary.

Nothing dramatic normally happens in between. Traffic triples, the bill goes up tenfold, somebody adds a retrieval step, somebody else extends the system prompt by two paragraphs, and the assistant gains the ability to call three tools instead of one. Each change is sensible on its own. Together they produce an invoice nobody on the team can itemise.

Test yourself on this. Can you say what one answer from your assistant costs? Which customer generates the largest bill? How much you pay for retries after timeouts? If the answer is “I’d have to work that out,” this is not a discipline problem. It is a missing layer that nobody installs at the start, because at the start it isn’t needed.

This piece is for teams that already have a working model-backed feature and want to understand its cost before that cost starts to matter. First I break the bill into its parts. Then I set out the four numbers your model provider cannot give you. Finally I get to the tools that produce them, using Langfuse as the worked example, with an honest accounting of what the tool itself costs.

Key takeaways

  • Model bills grow for several reasons at once: expanding context, expensive output tokens, retries, and agent loops. The invoice shows you only the total.
  • Four numbers your provider does not know: the cost of a typical answer, the cost of the worst one, the cost per customer, and the share of answers that are wrong.
  • The layer that produces those numbers is called observability. Getting started is free, and the first useful result takes a few hours.
  • That layer costs money too, charged per recorded detail rather than per model call. How deeply you instrument is a pricing decision.

Prices, licence terms, and product details were verified on 13 August 2026. This market moves quickly, and Langfuse changed corporate ownership in January 2026. Follow the linked vendor pages before making a purchasing or architectural decision.

What a model bill is actually made of

Providers bill tokens, chunks of text shorter than a word. You pay separately for what you send and for what the model generates.

Below are the six mechanisms that actually drive the bill. They act at the same time, and each can be pulled on its own.

Output costs several times more than input. In Anthropic’s pricing, Claude Opus 5 is $5 per million input tokens and $25 per million output tokens. That five-to-one ratio repeats across the whole family, from Haiku 4.5 at $1 and $5 to Fable 5 at $10 and $50. A two-thousand-token prompt is cheap. A two-thousand-token answer is not. “Answer concisely” has a measurable value in currency.

The whole accumulated context ships on every call. The model API is stateless, so each request has to carry the entire prior history. In a chat you notice it immediately: the tenth turn pays for the previous nine. The bill hurts more where nobody reads that history any more. An agent working through a repository sends eleven earlier tool results on its twelfth step, and a single file read is often bulkier than a whole user conversation. The cost of such a session does not grow linearly with step count, it grows faster.

Caching changes that arithmetic. A repeated prompt prefix can be marked for the provider to remember. At Anthropic a cache read costs one tenth of the input rate, and a cache write costs 1.25 times normal input for the five-minute cache or twice as much for the one-hour cache. The five-minute cache pays for itself after the first hit, the one-hour cache after the second. With a fixed system prompt and long context, this is the single largest lever on the input side. It is also the easiest to break by accident: a timestamp or request ID at the start of the prompt stops the cache from hitting and the bill rises with no visible change in the code.

You pay for reasoning you never see. Reasoning models run an internal chain of thought before they start answering. It is billed as output, at the highest rate, and you usually never get it back in the response. So you cannot count it by measuring the text the user received. The only reliable source is the usage counter the provider returns alongside the answer.

Retries are billed in full. Timeouts, 429s, a format validation that failed, the retry logic inside your client library. Each attempt is a separate, billed call. That traffic never reached a single user and is on the invoice anyway.

Agent loops and retrieval multiply the rest. One user question can mean six model calls if the agent plans, calls tools, and summarises the result. Retrieval adds eight documentation chunks to the input on each of them. The product of those two can turn a fraction-of-a-cent answer into a two-dollar answer that looks identical from the outside.

There is a lever in the other direction too, and it is the simplest on the list. Instead of sending requests one at a time and waiting for each response, you collect them into one batch and hand it to the provider to process in the background. At Anthropic a batch holds up to 100,000 requests, most finish within an hour, and the hard limit is 24 hours, and it costs half the standard rate on input and output alike.

Anything nobody is waiting for with a browser open fits there: overnight tagging of yesterday’s tickets, summaries across a whole document store, backfilling missing fields on old records, re-running an eval set after a prompt change. Accepting that the result arrives later costs you half as much.

What the invoice and the logs do not show

The provider invoice shows tokens by model and by day. A gateway dashboard, if you run one, adds a breakdown by API key. Neither knows what that particular answer was, who it was for, or whether it was correct.

There is also a failure mode conventional monitoring does not anticipate. Ordinary applications end a request in success or failure. Model-backed features break a third way: they return HTTP 200 with a confident, well-formatted, wrong answer. To your metrics that looks exactly like success.

The specific blind spots look like this:

  • Tokens are reported per model, and almost never per customer, per feature, or per conversation.
  • An agent calling six tools leaves six unconnected log lines and no picture of the whole run.
  • Weak retrieval looks, from the outside, exactly like a weak model.
  • Prompts live in code, in environment variables, and in somebody’s editor tab, with no change history.
  • Quality regressions are found by users, because there is no test set and no scoring.
  • Asked whether a new model is better for them, the best available answer is “it seems better.”

None of these is fatal on its own. Plenty of teams ship LLM features with nothing but application logs, and it serves them for a long time. The question is when the absence of this layer starts costing more than the layer does. That moment usually arrives with the first paying customer who complains about a specific conversation.

The four numbers you need to be able to state

If you can state these four numbers, you control the cost. If you cannot, you are watching it.

1. The cost of a typical answer. Not the mean, the median. The mean is dragged around by single large runs, which makes it look worse than reality on some days and better on others. The median tells you what an ordinary user costs in an ordinary situation, and that is the figure that belongs in the business model.

2. The cost of the tail. The 95th and 99th percentiles. This is where agent loops that failed to stop, hundred-turn conversations, and retrieval-inflated contexts live. Budgets are not blown by the median, they are blown by the tail, and the tail grows on its own every time you hand the agent another tool.

3. The cost per customer and per feature. Without this you do not know whether a $12 monthly plan earns money or whether you are subsidising it. This number also decides whether to cap the free tier or introduce a higher plan for the ten percent of users who generate half the bill.

4. The share of answers that are wrong. Cost without quality is half the picture. A cheaper model always wins a cost comparison until you count how many of its answers need fixing. This is the only number that justifies paying more.

What all four have in common: none can be read from your model provider. The provider knows tokens, not your domain. These numbers have to be produced on your side, while the request is being served, and stored somewhere.

The layer that produces them

The category is LLM observability. In practice it means a library that records the run and its cost on every request, plus a place where those records can be browsed and summed.

Langfuse is currently one of the most popular open-source options in that category. I use it here as the worked example because it shows the whole category in one product, it runs free within minutes, and its pricing is concrete enough to calculate what this layer really costs. Alternatives come later.

It bundles five jobs that are often bought separately.

Tracing records what the application did: model calls, retrieval steps, tool invocations, agent branches, the latency of each, and the tokens and cost attached to them. This is the foundation, and it produces all four numbers from the previous section. Everything else builds on it.

Prompt management moves prompts out of the codebase into a versioned store with labels, so a prompt change becomes a deployment of its own rather than a code release.

Evaluations give you the fourth number. You can attach a result to any conversation: checked automatically by code, assigned by another model, labelled by hand, or derived from a thumbs up or down in your interface.

Datasets and experiments let you test a change before you ship it. You collect real production questions, run a new prompt or model against them, and compare quality, cost, and response time with the current version. It is the only honest way to answer the question about switching models.

Metrics and dashboards aggregate the above into cost per user, latency distributions, and quality trends over time.

There is also a full API surface: an OpenAPI specification, typed SDKs for Python and JavaScript, and an OpenTelemetry endpoint. I come back to that last one, because it decides what remains of this work in two years.

Trace, observation, score

Three concepts carry the whole product. In short: one conversation is a trace, its steps are observations, and a quality judgement is a score.

A trace is one end-to-end interaction: a chat turn, an API request, a full agent run.

An observation is a step inside a trace. Langfuse distinguishes spans (units of work), events (points in time), and generations (model calls, carrying model name, token counts, and cost).

A score is an evaluation attached to a trace or an observation: numeric, categorical, or boolean, produced by an LLM judge, by code, or by a human.

These three concepts are also the Langfuse billing units. A single support answer with one retrieval step and two model calls is not one record. It is a trace plus four or five observations plus every score you attach. I return to the arithmetic in the pricing section.

Wiring it into the application

Langfuse ships two official SDKs, Python v4 and JS/TS v5, both built on OpenTelemetry. For every other language, Ruby included, the supported route is the OpenTelemetry endpoint: it carries tracing and cost, but not prompt management or evaluations.

What OpenTelemetry is. Your application has to tell somebody what it just did: a request arrived, a model call went out, it took 1.4 seconds. Every monitoring tool used to want that story told its own way, so its library went into hundreds of places in your code, and changing tools meant rewriting those hundreds of places. OpenTelemetry, OTel for short, is one agreed way of telling it, developed by the CNCF, the same foundation behind Kubernetes. A bit like USB, which lets you replace the printer without replacing the socket in the computer. The code you add to your application is called instrumentation and it stays yours, while where the data goes is one line of configuration.

TypeScript

Here is one function that answers a customer question, with the instrumentation around it.

import { propagateAttributes, startActiveObservation, startObservation } from "@langfuse/tracing";

async function answerQuestion(question: string, userId: string) {
  return propagateAttributes({ userId, tags: ["support"] }, () =>
    startActiveObservation("answer-question", async (span) => {
      span.update({ input: { question } });

      const retrieval = startObservation("retrieve-context", { input: question });
      const context = await retrieve(question);
      retrieval.update({ output: context }).end();

      const generation = startObservation(
        "answer",
        { model: "claude-sonnet-5", input: { question, context } },
        { asType: "generation" },
      );
      const answer = await generate(question, context);
      generation.update({ output: answer }).end();

      span.update({ output: answer });
      return answer;
    }),
  );
}

That is enough to get cost per user and cost per feature, the third of the four numbers. Without userId in propagateAttributes you have a total, not a breakdown. And asType: "generation" decides whether Langfuse treats the step as a model call and attributes tokens and cost to it.

The most important architectural consequence is simple: an outage in the observability layer must not stop the feature it observes. Requests are sent asynchronously in the background, and SDK errors are caught and logged rather than raised. Langfuse says this adds almost no latency to the application. Short-lived processes, such as serverless functions and scripts, do need an explicit buffer flush before they exit.

In practice that means two things. Instrumentation from third-party libraries shows up in Langfuse traces without any work from you, and applications in languages without a native SDK can send data straight to the OTel endpoint. That is a considerable hedge for a layer that reaches this deep into your code.

Ruby and Rails

This is where the OpenTelemetry argument gets tested, because there is no official Ruby SDK. You use plain OpenTelemetry instead and point the exporter at Langfuse.

# Gemfile
gem "opentelemetry-sdk"
gem "opentelemetry-exporter-otlp"

# config/initializers/tracing.rb
require "opentelemetry/sdk"
require "opentelemetry/exporter/otlp"

OpenTelemetry::SDK.configure # reads the OTEL_EXPORTER_OTLP_* env vars
TRACER = OpenTelemetry.tracer_provider.tracer("support-assistant")

# app/services/answer_question.rb
def answer_question(question, user_id)
  TRACER.in_span("answer-question", attributes: { "user.id" => user_id }) do
    context = TRACER.in_span("retrieve-context") { retrieve(question) }

    TRACER.in_span("answer", attributes: {
      "gen_ai.system" => "anthropic",
      "gen_ai.request.model" => "claude-sonnet-5",
    }) do |span|
      answer, usage = generate(question, context)
      span.set_attribute("gen_ai.usage.input_tokens", usage.input_tokens)
      span.set_attribute("gen_ai.usage.output_tokens", usage.output_tokens)
      answer
    end
  end
end

Configuration goes through the standard OpenTelemetry environment variables, so not one line in the code is Langfuse-specific:

AUTH=$(printf '%s' "pk-lf-...:sk-lf-..." | base64 | tr -d '\n')
export OTEL_EXPORTER_OTLP_ENDPOINT="https://cloud.langfuse.com/api/public/otel"
export OTEL_EXPORTER_OTLP_HEADERS="Authorization=Basic ${AUTH},x-langfuse-ingestion-version=4"

The whole difference lives in the attribute names. A span carrying gen_ai.* attributes shows up in Langfuse as a generation, with model, tokens, and cost, while user.id and session.id attach the trace to a user and a session. Every other span lands as an ordinary step.

What you get this way is tracing, cost, and latency, which is the foundation and all four numbers. Prompt management, datasets, and evaluations do not travel over OTel; those go through the Langfuse public API. Rails adds one trap: a long-lived web process flushes on its own, but a queue job or a rake task that exits immediately has to shut the exporter down explicitly.

If you already run an LLM gateway, you can start with no application change at all. LiteLLM can forward every proxied call to Langfuse through a callback, capturing token usage, cost, and latency per request.

litellm_settings:
  callbacks: ["langfuse_otel"]

That configuration gives you full coverage of model traffic and nothing beyond it. It will not see the retrieval step, the tool calls, or the agent’s control flow, because the gateway never saw them either. Gateway-level logging tells you what was sent. SDK instrumentation tells you why.

One caveat before you show anyone a cost dashboard. The numbers are useful, but they are not automatically an accounting truth. When the provider returns token counts, Langfuse uses those before its own estimate. When it does not, it estimates usage with tokenisers and its own model definitions. Custom and fine-tuned models need their own price definitions. Reasoning models cannot be estimated reliably without provider counters, because their hidden reasoning tokens are invisible to a tokeniser. If finance is going to use these numbers, reconcile a sample against the invoice before you trust the dashboard.

An adoption path that does not create a platform team

Order matters more here than the choice of tool, and every stage is useful on its own. You can stop at any of them and still be ahead.

Stage one, one afternoon. Sign up for the free plan or run Docker Compose locally, and add the SDK to one feature. Instrument the trace, the retrieval, and the model calls. The goal is to answer “what happened in this specific conversation” and nothing more. That alone solves the most common real problem, a customer complaint you cannot reproduce.

Stage two, the first month. Turn on user and session identifiers so cost can be attributed. Add a few scores, whether from an LLM judge or a thumbs control in your interface. After this stage you have all four numbers and can stop guessing.

Stage three, once it pays for itself. Move prompts into prompt management, with a fallback prompt in code. Build a dataset from the traces where something went wrong, and run experiments on it before every prompt or model change. This is the stage that returns the whole investment, and most teams stop just short of it.

Stage four, only if the numbers say so. Compare the hosted service with self-hosting using a real volume from stage three rather than an estimate. If self-hosting wins, deploy it on Kubernetes with managed ClickHouse and assign it an owning team, not a singular owner.

What this layer itself costs

Here we return to traces, observations, and scores, because that is exactly what Langfuse charges for. A billing unit is “any tracing data point sent to the platform,” so instrumentation depth feeds straight into the bill.

If you do not already operate ClickHouse, the hosted service is the sensible starting point. It has four plans; all figures are per organisation, per month, as published on the pricing page.

PlanPriceIncluded unitsData accessUsersSupport
Hobby$050k30 days2Community via GitHub
Core$29100k90 daysUnlimitedIn-app
Pro$199100k3 yearsUnlimitedPriority in-app
Enterprise$2,499100k3 yearsUnlimitedDedicated support engineer

Usage above the included allowance is billed per 100k units on a sliding scale: $8.00 from 100k to 1M, $7.00 from 1M to 10M, $6.50 from 10M to 50M, and $6.00 above 50M.

The included unit allowance is identical at every paid tier. So you are not buying capacity, you are buying retention, support, and governance features. That is a rational design, and it means plan choice and usage bill are two separate decisions.

How many units your application will generate

Take a support assistant. A user asks one question, and along the way the application records:

  • 1 trace for handling the whole question, from arrival to finished answer,
  • 1 observation for the knowledge-base lookup,
  • 2 observations for two model calls, since it first condenses the retrieved context and then writes the answer,
  • 1 observation for checking the order status in an external API,
  • 1 score for the automated quality check by an LLM judge.

Six billing units for one answer, not one. This is where estimates most often go wrong.

Answers per monthUnits at 6 per answerPlanUsage chargeMonthly total
8,00048kHobby$0$0
16,00096kCore$0$29
100,000600kCore$40$69
1,000,0006MPro$422$621

The $422 in the last row comes from the sliding scale: 900k units at $8.00 per 100k, then 5M units at $7.00 per 100k. The examples assume constant instrumentation depth and no volume discount, and they exclude tax. They show the shape of the curve, not a forecast of your bill.

Pricing is generous at small scale and stays reasonable in the middle. A team running a million agent sessions a month, each with twenty observations, has a completely different bill, and that is exactly where self-hosting starts to look interesting.

The lever you control is instrumentation depth and retention, not the rate. Deciding that a routine cache hit does not need its own observation is a pricing decision as much as an engineering one.

The operational fine print

Ingestion is rate limited per organisation: 1,000 requests per minute on Hobby, 4,000 on Core, and 20,000 on Pro, with the rest of the public API limited to 30, 100, and 1,000 requests per minute respectively, and a 5 MB cap per request and response. Enterprise customers have custom limits. Batching makes these numbers less restrictive than they look, but an application sending many small requests will hit them on Hobby.

Data access windows are a hard constraint. Thirty days on Hobby is enough to debug last week’s incident and not enough to compare this quarter with the last one.

The service runs in four separate regions: US (Oregon), EU (Ireland), Japan (Tokyo), and a HIPAA region in Oregon. Accounts, data, and infrastructure are fully separated between them, and projects cannot be moved directly; switching regions means a new account plus a data migration using the provided scripts. Choose the region before you have a year of history in the wrong one.

On compliance, Langfuse publishes SOC 2 Type II and ISO 27001 certifications with annual audits, GDPR compliance with a data processing agreement, annual third-party penetration tests, and the HIPAA-ready region. Enterprise plans carry a 99.9% uptime SLA.

Langfuse now belongs to ClickHouse

On 16 January 2026, ClickHouse announced that it had acquired Langfuse. That changes the vendor risk calculation for a tool you are about to embed in your application code. If you make that assessment systematically, a vendor lock-in audit fits here.

Acquisition announcements usually stop at a promise of continued commitment to the community. This one names things you can check: the licence, the deployment mode, the endpoints, and the SLAs. ClickHouse says Langfuse remains “100% open-source under its existing MIT licence for core features” and that self-hosting at production scale stays supported. Langfuse’s own announcement adds that there are no planned licensing changes, that the hosted service keeps running as-is with the same endpoints, and that support channels and SLAs for existing customers are unchanged.

The acquisition makes technical sense, because Langfuse already stored traces in ClickHouse. The buyer acquired a product built on its own technology.

For anyone evaluating the tool today, three things follow.

First, the MIT core is an insurance policy. A licence already granted cannot be revoked for code you already hold, and current sources can be forked. Commercial pressure, when it comes, will land on enterprise features and the hosted service, not on the tracing core.

Second, the owner is now a US company. The EU region in Ireland still operates and the certifications listed above remain current, but teams that chose this product partly as a European alternative should reread their own compliance rationale rather than assume it still says what it said in 2025.

Third, a well-funded owner reduces abandonment risk and increases the chance that the roadmap bends toward the parent platform. Both effects are worth weighing and neither is speculative enough to skip.

Self-hosting: an MIT core and an infrastructure bill

Self-hosting mainly makes sense when you have high volume or specific data requirements plus a team that can operate ClickHouse. Otherwise, start with the hosted service.

The self-hosted open-source edition is free with no usage limits. It includes tracing, evaluation, prompt management, datasets, and the APIs. It is not a demo tier.

A commercial licence key mainly unlocks governance features: project-level RBAC, protected prompt labels, data retention policies, audit logs, server-side masking, UI customisation, organisation creators, and the organisation and instance management APIs including SCIM. Enterprise self-hosting is priced on request, and Langfuse notes that its pricing sits on top of a commercial ClickHouse plan.

That list is a map of who is expected to pay. It is almost entirely governance: who sees which project, what is masked, how long data lives, and who did what. A five-person startup will not miss any of it. A bank will need most of it from day one.

What you actually operate

A self-hosted deployment has six moving parts:

web container        -> UI, API, ingestion endpoint
worker container     -> asynchronous event queue processing
PostgreSQL           -> transactional data: users, projects, prompts, configuration
ClickHouse           -> traces, observations, scores, analytics
Redis or Valkey      -> queue and cache
S3 or equivalent     -> raw events and multimodal attachments

Every component must run with its timezone set to UTC. That is a documented requirement, not a recommendation.

For evaluation and low-scale use, Docker Compose works on a single VM. Langfuse recommends at least 4 cores and 16 GiB of memory, roughly a t3.xlarge, plus around 100 GiB of storage, and states plainly that this setup lacks high availability, scaling, and backups. For production, the documented path is Kubernetes with Helm, or Terraform modules for AWS, Azure, and GCP.

ClickHouse is the component that decides how hard this actually is. Langfuse v4 requires ClickHouse 25.12 or higher and recommends ClickHouse Cloud or BYOC for larger deployments. If you run it yourself, the production guidance is at least three replicas, a large resource profile, and volumes from 100 GiB with auto-expansion. ClickHouse is CPU and memory hungry under analytical load and high concurrency. A single container has no redundancy and is explicitly discouraged in production.

If your team has never operated ClickHouse, that sentence is the entire decision. You are not deploying an application, you are deploying an analytical database with a UI on top.

What it costs per month

Take a deliberately simple production example: roughly $400 a month for compute, managed PostgreSQL, ClickHouse, Redis, object storage, and backups, plus three engineering hours a month at an assumed fully loaded $100 an hour for upgrades, migrations, and capacity planning. That is $700 a month before anyone is paged at night.

At hosted rates, $700 corresponds to a Pro plan plus roughly seven million units a month. Below that volume the cloud is usually genuinely cheaper. Above it, self-hosting starts to pay for itself, provided the team was going to have platform skills anyway.

These figures are illustrative, not a quote. Real infrastructure can be far cheaper for an internal tool with short retention, and several times more expensive for a multi-region regulated deployment with three ClickHouse replicas and a real backup strategy. The method is the point: compare total cost of ownership, not the licence fee, because the licence fee is zero and it is not the expensive part.

Self-hosting more often wins for three non-financial reasons than on price. Traces containing prompts and answers never leave your infrastructure. Retention is your decision rather than a plan feature. And there is no per-unit meter discouraging engineers from tracing deeply.

Prompts, answers, and personal data

Tracing an LLM application means recording prompts and answers, and those often contain exactly the data your privacy policy is about. This is the part of the rollout that is easiest to miss and hardest to fix retroactively.

Start by configuring masking in the SDK before transmission. It removes sensitive data before a trace leaves your application and works the same way on the hosted service and on self-hosted deployments. Server-side masking also exists, but it is an enterprise feature.

Self-hosting removes the vendor from the data path for your traces. It does not change where inference happens: prompts still go to OpenAI, Anthropic, Google, or wherever the gateway routes them, on their retention terms. That is the same correction that applies to self-hosted gateways, and it is worth repeating, because “self-hosted” is routinely confused with “private.”

What breaks when the observability layer breaks

One product hides two dependencies with very different failure profiles, and it is worth separating them in your head before an incident separates them for you.

Tracing is fire-and-forget. When the backend is unreachable, events queue up and the SDK swallows the error. The feature keeps working and you lose visibility.

Prompt management is a different case, because the application reads the prompt at runtime and the tool becomes part of the critical path. The cache limits that risk: by default it holds a prompt for 60 seconds, and after that it can still serve the previous version while refreshing in the background. When the API is unreachable, a stale cache still serves traffic.

That is a sensible design, and even so a cold start during an outage falls back to whatever you wrote in code. Define a fallback prompt for the case of an empty cache and no network. Otherwise you will discover the requirement during the incident.

Alternatives, and when they win

Langfuse is not the only reasonable answer, and for some teams it is the wrong one. Do not compare these tools by feature count. Decide first whether you need SDK instrumentation, a proxy, or a module in a monitoring suite you already pay for. The comparison below reflects published pricing and licences as of the verification date.

ToolLicence and self-hostingEntry priceStrongest when
LangfuseMIT core, enterprise features licensed, full self-hosting supportFree tier of 50k units; Core $29; Pro $199You want one tool for traces, prompts, and evals with a real exit path
LangSmithClosed source; self-hosting on Enterprise onlyDeveloper free with 5k traces; Plus $39 per seatYour stack is LangChain or LangGraph and you want the native tool
HeliconeApache 2.0; on-premise on EnterpriseHobby free with 10k requests; Pro $79; Team $799You want a proxy that logs without touching application code
Arize Phoenix and AXPhoenix under Elastic License 2.0; AX self-hosting on EnterprisePhoenix free locally; AX free with 25k spans, Pro $50Evaluation depth and ML team workflows matter most
Opik by CometApache 2.0, full feature set when self-hostedCloud free with 25k spans; Pro $19You want a permissive licence with no enterprise feature split
BraintrustClosed source; hybrid and on-premise on EnterpriseFree with 1 GB and 10k scores; Pro $249Eval-driven development is the primary workflow
Datadog LLM ObservabilityClosed source, SaaSBilled per LLM span, published on the Datadog pricing pageThe company already runs Datadog and wants one pane of glass

A few observations the table cannot carry.

LangSmith prices both seats and traces, which changes the maths for larger teams. Base traces have fourteen-day retention, and longer retention is a paid add-on. Self-hosting is Enterprise-only, so the fallback position against unacceptable pricing looks different from Langfuse.

Helicone is Apache 2.0 and works primarily as a proxy. That is the fastest possible integration, and it also inserts another hop into the request path. The free tier retains data for 7 days.

Arize Phoenix is strong on evaluation but ships under Elastic License 2.0, which is not an OSI-approved open-source licence. If your organisation has a licence policy, check it before Phoenix reaches production.

Opik is the closest pure open-source competitor: Apache 2.0, and Comet states that the self-hosted edition has the full feature set. If the enterprise feature split is what bothers you about Langfuse, this is the alternative to evaluate seriously.

Braintrust bills processed data and scores rather than spans, which suits heavily eval-driven workflows and makes cost comparison with the others genuinely hard.

For a sense of adoption: the Langfuse repository currently has around 33,000 stars, against roughly 21,000 for Opik, 11,000 for Phoenix, and 6,000 for Helicone. Popularity is not quality, but for an open-source tool you might self-host, the size of the community that has already hit the upgrade problems is a legitimate criterion.

When not to adopt this layer

Your product has one model call and forty users. Application logs are entirely sufficient. This layer is adopted when you have a debugging problem or a bill problem, not in anticipation of one.

The company standardised on Datadog and the AI feature is a small part of a large system. A second observability tool with a second login and a second bill has to justify itself against the correlation you lose by splitting telemetry.

You want the gateway and the logging to be the same thing. That is the Helicone model. Langfuse observes the application, not the wire.

You are self-hosting to save money and nobody on the team has run ClickHouse. The infrastructure will cost more than the plan you avoided, and it will fail in the quarter where that hurts.

Your organisation bans non-OSI licences and you need enterprise features. The core is MIT, but audit logs, RBAC, and retention policies are not, and the only supported route is to pay for them.

One more limitation, reported by users rather than the vendor: teams with sophisticated prompt engineering workflows sometimes find Langfuse prompt management thinner than dedicated tools, particularly around branching and rollback ergonomics. If prompt management is your reason for adopting it, trial that module separately before deciding.

Which approach fits which product

SituationPractical starting pointWhy
Prototype or side projectLangfuse Cloud Hobby50k units and 30 days of history cost nothing and answer the debugging question immediately.
Early SaaS with a real LLM featureLangfuse Cloud Core$29 buys 90-day retention and unlimited seats, which is usually the binding constraint.
Team building on LangChain or LangGraphTrial LangSmith alongside LangfuseNative integration depth can outweigh licence and pricing preferences.
Regulated product, prompts contain personal dataSelf-hosted Langfuse with SDK maskingTrace storage stays inside your boundary; inference providers remain a separate question.
High volume and an existing platform teamSelf-hosted Langfuse on KubernetesAn unmetered MIT core beats a per-unit meter once ClickHouse is a solved problem.
Organisation standardised on one observability suiteEvaluate that vendor’s LLM module firstCorrelated telemetry and one commercial relationship often beat a better standalone tool.
Licence policy rules out non-OSI feature splitsEvaluate OpikApache 2.0 across the feature set takes the question off the agenda.

Before adopting, answer six questions.

  1. What decision will we make differently once we can see this data?
  2. How many units will our instrumentation depth actually produce, and how long must we keep them?
  3. Do the prompts and answers in our traces contain personal or regulated data?
  4. Who operates ClickHouse if we self-host, and what happens when they leave?
  5. Which enterprise features do we need in year one: RBAC, audit logs, retention policies, or masking?
  6. If we replace this tool in two years, what remains: the OpenTelemetry instrumentation, or nothing?

That last question is exactly why OpenTelemetry carries the weight it does in this decision.

Start with one number, not with a platform rollout

Controlling model cost does not begin with picking a tool. It begins with saying “I don’t know” when asked what one answer costs. Until somebody on the team can state that figure, every optimisation is guesswork and every model change is a bet.

The cheapest first step is an afternoon with a free plan and one instrumented feature. You get cost per answer and the ability to replay any conversation. The rest, meaning evaluations, prompt management, and the choice between cloud and your own infrastructure, is a later decision that needs numbers you do not have yet.

Visibility has a price too, just in a different currency. The cloud charges per recorded detail, which is generous at the start and gets expensive precisely when the product succeeds. Self-hosting removes the meter and hands you an analytical database to operate, which is cheap for a team with a platform already and expensive for everyone else. The MIT core makes both directions reversible, and the OpenTelemetry foundation means that even changing tools does not throw away the instrumentation work.

You will make that choice calmly once you have something to base it on.

Want to discuss this topic?

Let us turn the idea into a practical architecture and implementation plan.

Book a Consultation