Langfuse: Observability for LLM Applications

Langfuse: Observability for LLM Applications

Langfuse is tracing for applications where the expensive, slow, non-deterministic component is a language model.

Why normal observability falls short

A traditional trace records that a call took 2 seconds. For an LLM application you also need to know what prompt was sent, what came back, how many tokens it cost, which model version answered, and whether the output was any good.

That is a different data shape, and it is why Jaeger and Grafana do not cover it well. Langfuse records nested traces where spans are model calls, retrievals and tool invocations, with inputs and outputs attached.

What it gives you

Cost and token accounting per trace, per user, per feature. On a system making many model calls per request this is the difference between a known unit economics and a surprise invoice.

Prompt management with versioning, so prompts live outside the application and can be changed and rolled back without a deploy.

Evaluation, scoring outputs by model-as-judge, heuristics or human review, attached to the traces so a regression is traceable to a change.

Where it fits

Alongside a gateway rather than instead of one. LiteLLM sits in the request path and handles routing, fallback and rate limits; Langfuse observes. Running both is common, and LiteLLM can emit to Langfuse directly.

For local inference, our running LLMs locally guide covers Ollama and vLLM, both of which can sit behind the same instrumentation.

Self-hosting

A containerised stack backed by PostgreSQL and, for larger deployments, ClickHouse for the analytical side. Our PostgreSQL guide and Compose guide cover the pieces.

Self-hosting is supported and developed alongside a commercial cloud offering, so some documentation assumes the hosted product.

Operational caution

Traces contain the full prompt and completion. For an application handling personal data, that means your observability store now holds it too, at whatever retention you configured. Decide what to redact before you instrument, not after.

License

Langfuse core is released under the MIT License, with some enterprise features under a separate commercial licence.