LLM Observability: Tracing, Token Costs and Latency in Production AI Apps

LLM observability records what your AI app did on every request: tokens, cost, latency, and tool calls. Compare Langfuse, LangSmith, and OpenTelemetry.

By Galactic News Editorial · Published 2026-11-16T13:47:22+00:00 · Updated 2026-11-16T13:47:22+00:00

LLM observability tools tracing token costs and latency in production AI apps

LLM Observability: Tracing, Token Costs and Latency in Production AI Apps

LLM observability means recording what your AI app actually did on every request. Not just whether the server answered, but which model ran, what it cost, how long each step took, and why it gave that answer. Without it, you are guessing. With it, you can explain a bad answer, catch cost drift, and fix slow agents before users complain.

The short answer is simple. Capture a trace per request, with tokens, cost, latency, and tool calls on every step. Send it to a tracing platform or an OpenTelemetry backend. Then set alerts on cost per request, latency, and error rate.

What LLM Observability Means in Practice

A traditional app is deterministic. The same input gives the same output, so logs and metrics are enough. An LLM app is not deterministic. The same prompt can give different answers, a small prompt change can double the token bill, and an agent loop can run ten tool calls when one would do. Observability exists to make that behavior visible.

The core unit is the trace. One trace records one end-to-end request. Inside it, spans record each step: the retrieval call, each model call, each tool call, and each guardrail check. Each span carries its own tokens, latency, and cost. Roll them up and you get the cost and latency of the whole request.

Five signals matter most. Input and output tokens per model call. Cost, computed from tokens and your current price table. Latency per step and per trace. The prompt version and model used. And the retrieved context and tool calls, so you can see what the model actually saw. Add user feedback and guardrail events, and you can explain almost any bad output.

Observability also covers quality, not just performance. Run evaluators on sampled live traffic. Compare new prompt versions against a dataset before shipping. Track scores over time so a quiet regression shows up in a chart instead of a customer complaint.

LLM Observability Tools: Langfuse vs LangSmith vs the Rest

Three options cover most teams. Langfuse is the open-source default. LangSmith is the LangChain-native platform. OpenTelemetry is the vendor-neutral standard that feeds any backend. Helicone sits in front of your model calls as a proxy. The table below compares them on the facts that drive the decision.

ToolWhat it isHow it billsFree tierFirst paid plan
LangfuseOpen-source LLM engineering platform: tracing, prompt management, evaluations, annotationPer unit: a trace, observation, or scoreHobby: free, 50,000 units a month, 2 users, 30 days of dataCore: $29 a month, 100,000 units, $8 per extra 100,000
LangSmithLangChain platform: tracing, datasets, evaluation, deploymentPer seat plus per traceDeveloper: free, 1 seat, 5,000 base traces a monthPlus: $39 a seat a month, 10,000 base traces
HeliconeProxy and gateway in front of model callsPer proxy request: one model callFree tier availablePro: $79 a month
OpenTelemetryVendor-neutral standard for traces, metrics, and logsNo licence fee; you pay for the backend you chooseFree, open sourceBackend cost only

The meter is the decision. Langfuse counts units, so one agent run with many steps can cost dozens of units. LangSmith counts traces, so one agent run with many steps costs one trace, up to 25,000 runs per trace. Helicone counts model calls, so an agent turn with five tool calls is at least five requests. The same workload can cost very different amounts on each.

Langfuse suits teams that want self-hosting or low cost. Its core is MIT-licensed and free to self-host. Cloud pricing is flat and seat-free, which keeps small teams cheap. ClickHouse acquired Langfuse in January 2026, and the company says it stays open source with no planned licensing changes.

LangSmith suits teams already building on LangChain or LangGraph. Tracing turns on with environment variables and no code changes. It also offers datasets, online evaluators, and deployment in the same platform. The trade-off is cost at volume: seats plus traces add up fast, and self-hosting needs the Enterprise plan.

OpenTelemetry suits teams that already run observability infrastructure. Langfuse can ingest OpenTelemetry data, and many backends accept it. It avoids lock-in, but you build the dashboards and alerts yourself.

What to Trace on Every Request

Start with a short checklist. Capture the trace ID and link it to the user or tenant. Record the prompt version and the model name. Record input and output tokens on every model call. Record latency per span. Record every tool call with its inputs and outputs. Record retrieved chunks and their scores. Record guardrail decisions and user feedback.

Cost needs a price table you control. Do not trust the model provider's dashboard alone. Multiply tokens by your own current rates, store the result on the span, and sum it per trace. That gives you cost per task, per tenant, and per feature. It also lets you alert when a single request costs ten times the median.

Set hard caps. Limit agent steps per request. Limit tokens per request. Limit retries. A runaway agent loop is the most common cause of a surprise bill, and a cap is the cheapest insurance against it.

Watch for context bloat. When retrieved context grows, token use grows with it, and latency follows. Track tokens per request over time. A steady climb usually means a prompt or retrieval change added context nobody noticed.

Costs, Retention, and Self-Hosting

Pricing in this space changes often, so check the vendor page before you commit. As of late 2026, Langfuse Cloud runs Hobby free, Core at $29 a month, Pro at $199, and Enterprise at $2,499, with overage starting at $8 per 100,000 units and falling with volume. Retention is 30 days on Hobby, 90 days on Core, and three years on Pro.

LangSmith runs Developer free and Plus at $39 a seat a month. Base traces are 5,000 a month on Developer and 10,000 on Plus, with 14 days of base retention and 180 days on extended retention. Additional base traces cost about $5 per 1,000 on current plans, based on LangChain's standard unit pricing. Note that older articles quote lower rates, so trust the current pricing page over a guide.

Retention is a hidden cost. Extended retention on LangSmith adds a further charge per trace. On Langfuse, retention is tied to the plan tier. Decide how long you need traces before you pick a plan. Fourteen days is enough for debugging. Ninety days suits incident review. Three years suits regulated industries.

Self-hosting is the cheapest option at scale for Langfuse, since the open-source core has no licence fee. It needs real infrastructure, though: multiple services, storage, and someone to run them. LangSmith self-hosting is Enterprise only. For most small teams, a cloud free tier is the right start, and self-hosting becomes worth it only when the cloud bill passes the cost of running the stack.

Setting Up Tracing in Five Steps

  1. Pick one tool and one app. Do not instrument everything at once. Choose the app with the highest traffic or the highest cost.
  2. Turn on tracing. For LangSmith with LangChain, set the tracing flag and API key as environment variables. For Langfuse, add the SDK and wrap your model calls. For OpenTelemetry, add the SDK and point it at your collector.
  3. Tag every trace. Add user ID, tenant, feature, prompt version, and model. Tags are what turn a pile of traces into answers.
  4. Build three dashboards. Cost per request over time. Latency percentiles over time. Error and guardrail rates over time. Check them weekly.
  5. Set three alerts. Cost per request above a threshold. Latency above your service target. Error rate above baseline. Alerts turn observability into protection.

After a week, review the data. Find the most expensive prompt, the slowest step, and the most common error. Fix one of them. That single loop is the whole value of observability: see, decide, fix, repeat.

Bottom Line

LLM observability tools pay for themselves the first time they explain a bad answer or catch a runaway bill. Langfuse is the cheapest flexible default, especially self-hosted. LangSmith is the shortest path for LangChain teams. OpenTelemetry keeps you vendor-neutral. Whichever you pick, trace every request, tag it well, and alert on cost and latency. The tool matters less than the habit.