Urgent.News

What's breaking now, across thousands of outlets.

AI

Do You Need OpenTelemetry for an LLM App? Probably Not Yet

AI applications fail in a particularly frustrating way: the prompt looks fine, the call "succeeded," and the answer is still wrong, slow, or expensive. Ordinary logs show you the request but not the steps a reasoning agent took to reach the output. In 2026 the teams that debug AI reliably are closing that gap by running LLM apps on the same observability foundation they already use for the rest…

Debugging AI applications can be frustrating, as the prompt may appear correct but the output can still be wrong, slow, or expensive. Traditional logs only show the request, not the reasoning steps the AI takes to generate the output. In 2026, debugging reliable AI systems will involve running LLM apps on the same observability foundation used for the rest of the system, and OpenTelemetry has become the standard for this.

When the model call is a span in the same ledger as other components like the database and queue, the mysterious answer becomes a replayable run that can be inspected. To instrument an AI app with OpenTelemetry, create a span covering the model call and attach the model name, token usage, and latency. Each agent tool call should be a child span.

Send these traces to a single observability backend, along with cost as a metric. This allows replaying a bad answer and identifying whether the issue lies in time, spend, or the reasoning process, which plain logs cannot provide. Instrumenting an LLM app is relatively simple – create a span for the model call with model, prompt, tokens, and latency attributes, and use the same trace ID for other calls like retrieval and tool executions.

Include the prompt and result in the span (while being mindful of size and PII) and add cost and token metrics labeled by model. Push these spans to the existing observability platform, as they become just another service to review alongside HTTP, database, and queue spans. The key takeaway is that OpenTelemetry is not a luxury for AI in 2026, but the most cost-effective way to make LLM calls and agent runs debuggable.

Start by tracing the most critical user path and the most expensive call, attaching a parent span and cost metric, and push the spans to the backend. This initial setup often justifies the effort before expanding to all calls. By treating the entire agent run as one trace with sub-calls, you can coherently analyze cost and latency, making debugging much more manageable.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in AI

I Built an AI Support Agent That Never Repeats a Failed Fix Using Hindsight

ResolveIQ is a support workflow built around that distinction. It combines ordinary operational records in PostgreSQL, a language model for drafting replies, and Hindsight for customer-level memory…

  • ResolveIQ AI support agent learns from previous interactions
  • Hindsight memory component records failed fixes and outcomes
  • React, TypeScript, FastAPI, PostgreSQL power the support workflow

More from Saturday 7 November →