Dev.to AI ๐Ÿค– Ai ๐Ÿ‘ 0 ๐Ÿ“– 6 min read

What is observability for LLM applications, why does it matter and how do you do it with Langfuse

Originally published on Zach Welshman's Substack, where I share other work Subscribe free here to get new posts in your inbox. As agent systems become more capable, being able to understand what they are doing and h

What is observability for LLM applications, why does it matter and how do you do it with Langfuse

Originally published on Zach Welshman's Substack, where I share other work Subscribe free here to get new posts in your inbox.

As agent systems become more capable, being able to understand what they are doing and how they are using tools is important. To move past prototypes, where you build an agent that does a thing, means reliably tracking and observing the traces it has left in its wave of reasoning and acting.

Agent with web searching capabilities

Setting the stall , letโ€™s take this LangChain Agent that has a web search capability and I am looking for the latest trends in open-source observabilty tools for AI Applications :

When this agent is invoked it will reason that it needs to use the web_search tool to achieve an answer to the question. However, the steps the agent actually takes are hidden from you the developer using an IDE. We need observabilty to surface the reasoning and acting loops, not just because weโ€™re curious, although this should be true, but because if an agents response is sub-optimal, or just wrong, we will not know where the reasoning and acting loop went off on a tangent, so we can improve our systems.

Hooking up Langfuse for traces and observations

Sending traces is fairly straight forward for this example. I just added a callback through with_configso i donโ€™t have to do it at the agent.invoke()stage and added a run_name to help me identify separate runs in the Langfuse dashboard.

Next I propagate_attributes with a context manager to allow the metadata to be send via the agent.invoke()with our question about latest trends in observabilty tools. Youโ€™ll find out that latest can be interpreted wrongly.

What can you see in Langfuse?

Quite a lot is going on in here, which can be overwhelming and iโ€™m sure you could customise the dashboard for your preferences. I personally use OpenRouter as my model router for testing hobby projects, thatโ€™s why the cost is $0โ€ฆ

What were the traces showing from our web search enabled agent? The image below shows my raw experiments and you will see there is the session id I set earlier called โ€˜observabiltyโ€™ - this is why its imported to name things correctly, youโ€™re traces will fill up quite fast if you have a behemoth agent spinning many plates.

Looking deeper into this session you can see system prompt, user_message, 3x tavily web searches and the assistant message final text response returned.

Looking deeper again into the contents of one of the web_search tool calls you can see exactly what the agent searched and how many results were returned from that tavily api search. You can twiddle the knobs on a tavily api search as you please for more depth or more results, bear i mind that context consumption will go up though.

Interestingly, itโ€™s looking for 2024 and 2025 trends in the query output despite this being the year 2026. You might then update your prompt with some timestamp information to group the agents reasoning and acting in this current year (pretty stupid that it did this though - latest should obviously include 2026โ€ฆ)

So hopefully if youโ€™re just entering the logs, monitoring or observabilty stage of your AI apps this was a useful look-seeโ€ฆ and if you wanted to know what the โ€˜Latest Trends for 2024-2025 AI observabilty wereโ€, well here you go:

Based on my research, here are the latest trends in open-source observability tools for AI applications as of 2024-2025:

๐ŸŽฏ Key Trends Shaping the Landscape

1. OpenTelemetry (OTel) as the Universal Standard

  • OTel-native instrumentation is now the baselineโ€”tools like OpenLIT, OpenObserve, Arize Phoenix, Langfuse, and Opik all emit or ingest OTLP traces.
  • GenAI semantic conventions (e.g., gen_ai.* attributes) are being standardized, enabling vendor-neutral tracing across frameworks (LangChain, LlamaIndex, CrewAI, Pydantic AI, Vercel AI SDK, etc.).
  • Zero-code / auto-instrumentation via OTel operators and eBPF is emerging (e.g., OpenLITโ€™s CLI for coding agents like Cursor, Claude Code, Codex).

2. Unified AI + Infrastructure Observability

  • Platforms like Grafana (Tempo/Loki/Prometheus), OpenObserve, and Signoz now correlate LLM traces with GPU metrics, vector DB latency, Kubernetes pod health, and cloud costs in a single dashboard.
  • GPU monitoring (NVIDIA/AMD/Intel) is becoming a first-class feature for self-hosted model serving (e.g., OpenLIT, NVIDIA NIM + Prometheus).

3. Agent-Centric Tracing & Multi-Turn Session Views

  • Tools visualize nested spans for agent loops, tool calls, RAG retrieval, sub-agents, and multi-turn conversations.
  • Session/thread grouping (Langfuse, Opik, LangSmith) lets you follow a userโ€™s entire interaction with an agent, not just a single LLM call.

4. Built-In Evaluation: LLM-as-a-Judge & Human-in-the-Loop

  • Online evaluation on production traces (span/trace/session level) using LLM-as-a-Judge is now a core feature (OpenObserve, Langfuse, Opik, Phoenix, Confident AI).
  • Offline/batch evaluation against curated datasets for regression testing before deployment.
  • Human annotation queues for expert review of flagged traces (Langfuse, Phoenix, Confident AI).

5. Granular Cost & Token Tracking

  • Per-model, per-session, per-user token usage and USD cost breakdowns (OpenObserve, Langfuse, Opik, Phoenix).
  • Budget enforcement / circuit breakers that can block calls when cost thresholds are exceeded (emerging in OpenObserve Enterprise, Langfuse roadmap).

6. Prompt & Dataset Management as First-Class Citizens

  • Prompt versioning, templating, A/B testing, and deployment (Langfuse, Opik, Phoenix, MLflow).
  • Dataset curation for evaluation and fine-tuning, with UI + SDK workflows.

7. Self-Hosted / Data-Residency Focus

  • Apache 2.0 / MIT / AGPL licenses with ClickHouse / PostgreSQL / SQLite backends for full data control (Langfuse, OpenObserve, OpenLIT, Phoenix, Opik).
  • Kubernetes Helm charts / Docker Compose for easy on-prem / VPC deployment.

8. Coding Agent & MCP Observability

  • Specialized tracing for AI coding agents (Claude Code, Cursor, Codex, GitHub Copilot, Augment, Kiro) via lifecycle hooks or native OTel export (Langfuse, OpenLIT).
  • MCP (Model Context Protocol) tool call tracing is being added as agents adopt standardized tool interfaces.

9. Guardrails & Real-Time Safety

  • Inline PII detection, prompt injection blocking, and tool misuse prevention via small, fast SLMs (OpenObserve Enterprise, Splunk Agent Observability, emerging in open-source).

10. Trace Replay & Debugging Non-Determinism

  • Span-based trace replay to reproduce non-deterministic LLM/agent failures (MLflow, Langfuse, Phoenix).
  • Diffing agent runs across prompt/model versions for regression detection.

๐Ÿ› ๏ธ Leading Open-Source Tools (2024-2025)

Tool License Key Strengths Best For
Langfuse MIT Agent tracing, evals, prompt mgmt, self-hosted, ClickHouse, OTEL Teams wanting a full LLM engineering platform
OpenObserve AGPL-3.0 Unified infra + LLM observability, OTel-native, SQL-queryable, online evals Teams wanting one tool for AI + infra
Arize Phoenix Apache 2.0 RAG evaluation, embedding drift, OTEL, self-hosted RAG-heavy apps, research-grade eval
OpenLIT Apache 2.0 OTel-native, GPU monitoring, coding agents, MCP, guardrails Self-hosted models, GPU stacks, coding agents
Opik (Comet) Apache 2.0 Agent graphs, multi-turn sessions, LLM-as-judge, 22k+ stars Agent workflow debugging, eval-heavy teams
TruLens MIT Feedback functions (groundedness, relevance), LlamaIndex/LangChain Qualitative eval, RAG quality pipelines
MLflow Apache 2.0 End-to-end GenAI lifecycle, trace replay, prompt versioning ML teams already using MLflow
Grafana Stack AGPL-3.0 Tempo (traces), Loki (logs), Prometheus (metrics), AI-assisted tracing Teams already on Grafana/LGTM stack

๐Ÿ“ˆ What to Watch in 2025-2026

  1. OTel GenAI Semantic Conventions v1.0 โ€“ stable, vendor-neutral attribute schema.
  2. eBPF-based zero-code instrumentation for AI workloads (kernel-level GPU, network, syscall visibility).
  3. Small Language Model (SLM) judges for low-latency, low-cost inline evaluation.
  4. Agent-to-Agent (A2A) protocol observability as multi-agent systems standardize.
  5. Cost-aware routing & caching integrated into observability platforms (semantic caching, model fallback).
  6. Compliance-ready audit trails (RBAC, audit logs, data lineage) in open-source editions.

๐Ÿ’ก Recommendation

  • Start with OpenTelemetry instrumentation (use openinference or framework-specific OTel SDKs) to avoid lock-in.
  • Pick a backend that matches your stack:
    • Grafana/LGTM โ†’ if you already use it for infra.
    • Langfuse / OpenObserve / Phoenix โ†’ if you want AI-native workflows (evals, prompts, cost) in a self-hosted tool.
    • OpenLIT โ†’ if you self-host models on GPUs and need coding-agent visibility.
  • Invest in evaluation early (LLM-as-judge + human review) โ€“ itโ€™s the differentiator for production quality.

The ecosystem is converging on OTel + ClickHouse + integrated evals as the open-source found

Enjoyed this walkthrough?

I write weekly practical breakdowns on LLM observability, structured outputs, and production AI agents.

๐Ÿ‘‰ Subscribe to my Substack for free to get future code walkthroughs delivered straight to your inbox.

๐Ÿ“ฐ Read the original article on Dev.to AI

Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes โ€” full credit and traffic to the original publisher.