Langfuse v4: up to 165ร— faster ยท Read more
DocsOverview

LLM observability and tracing

LLM observability is how you see what an AI application actually did: every model call, retrieval, and tool step, with the prompt, response, latency, and cost attached. Langfuse records that as application tracing โ€” structured logs of each request โ€” so you can debug non-deterministic behavior instead of guessing.

This page is for engineers and platform teams who need to inspect production LLM and agent traffic, attribute cost, and feed traces into evaluation. If you want the steps to send your first trace, start with the tracing quickstart.

Example of a trace in the Langfuse UI showing nested observations, timing, inputs, outputs, and metadata across a multi-step agent workflow.
๐Ÿš€

Want to see it in action? Create a free account and explore Langfuse Observability in the interactive example project.

What you can do with traces

Teams use Langfuse observability to:

  • Debug a failed or low-quality agent run by inspecting the exact prompt, retrieved context, and tool calls
  • Attribute token usage and cost to a user, feature, or release
  • Build evaluation datasets from real production traces and score quality with LLM-as-a-Judge
  • Watch cost, latency, and quality in custom dashboards and get alerts when a metric crosses a threshold

How Langfuse traces an application

A trace is one request. Nested observations record LLM generations, retrieval, tools, and your own spans. You can group related traces into sessions, tag them by user, environment, or release, and follow a request across services with custom trace IDs.

Ingest traces with the Python and JS/TS SDKs, 100+ integrations, OpenTelemetry, or an LLM gateway such as LiteLLM. SDKs send data asynchronously, so tracing does not add request latency.

Read What does a good trace look like? before you instrument a new app, and core concepts for the data model.

Getting started

Set up your first trace, then compare it against the best practices guide. If you are new to AI observability, start with core concepts and the Monitoring chapter in the Langfuse Academy.

Browse Features in the sidebar for the full list of observability features.

FAQ

What is the difference between observability and tracing?

Observability is the broader capability of understanding the internal state of your system from its outputs. It encompasses tracing, metrics, and logging. Tracing is a specific observability technique that records the flow of a request through your system, preserving causal relationships between operations. In LLM applications, tracing is the most important observability tool because it captures the full context of each request โ€” prompts, responses, tool calls, and their relationships.

What is application tracing?

Application tracing records the complete lifecycle of a request as it flows through your system. Each trace captures every operation โ€” LLM calls, retrieval steps, tool executions, and custom logic โ€” along with timing, inputs, outputs, and metadata. This gives you full visibility into what happened during each request, enabling debugging, performance optimization, and quality monitoring.

How does Langfuse compare to other tracing solutions?

Langfuse is purpose-built for LLM applications, so it natively understands token usage, model parameters, prompt and completion pairs, and evaluation scores. Unlike general-purpose APM tools, it includes LLM-as-a-Judge evaluation, prompt management, experiments and datasets, and custom dashboards. It is also open source and can be self-hosted.

Does Langfuse add latency to my application?

No. Langfuse SDKs send tracing data asynchronously in the background. Trace events are queued locally and flushed in batches, so your application's response time is not affected.


Was this page helpful?

Last edited