Evaluation and observability

Open sourceMITUpdated July 2026

Langfuse LLM Observability, Evaluation, and Prompt Management Platform

Langfuse is an open-source AI engineering platform for tracing LLM applications, debugging generations and agent steps, managing prompt versions, measuring costs and latency, building datasets, and running online or offline evaluations.

Intermediate · Self-hosted via Docker Compose with PostgreSQL, or Langfuse Cloud managed service with free and paid tiers

Editorial review

Reviewed byOpenSourcesAI EditorialLast updatedJuly 2026SourcesLangfuse GitHub, Langfuse observability documentation, Langfuse prompt management documentation, Langfuse evaluation concepts, Langfuse self-hosting documentation

Tool categories, pricing, source status, deployment options, and product claims can change quickly. Verify the official source before production or commercial use.

OpenSourcesAI verdict

Langfuse is one of the most complete open-source platforms for teams that need to understand and improve an LLM application after the prototype stage. Its strongest value comes from connecting traces, prompt versions, scores, datasets, and experiments into one feedback loop. It does not automatically make an application observable: instrumentation design, sensitive-data policy, evaluation quality, retention, and self-hosted operations still require deliberate engineering.

Best for

AI product and platform teams that need shared traces, prompt versioning, token and latency metrics, regression datasets, human or automated evaluation, production monitoring, and a choice between Langfuse Cloud and self-hosting.

Why use it

Use Langfuse when logs no longer answer why an AI request failed. A trace can connect model calls, retrieval, tool use, agent steps, inputs, outputs, timing, tokens, cost, user or session metadata, prompt versions, and evaluation scores. Those links make debugging and systematic iteration possible across development and production.

Traces, observations, and instrumentation design

A trace represents one end-to-end application request. Observations inside it can represent model generations, retrievers, embeddings, tools, agent steps, or ordinary application spans. Good instrumentation mirrors the product workflow closely enough that an engineer can identify where latency, cost, missing context, tool failure, or a bad model decision entered the request.

Capturing every input and output is not always appropriate. Teams should decide which fields are required for debugging, which must be redacted or hashed, which user identifiers are acceptable, and how long raw prompts, completions, images, and files may be retained.

Langfuse SDKs queue and send trace data asynchronously, but applications should flush before short-lived processes exit and monitor ingestion failures. Observability that disappears during incidents is not dependable observability.

Prompt management and deployment labels

Langfuse stores text or chat prompts with versions, configuration, and deployment labels. Applications can fetch a labeled prompt through an SDK and link the exact version to a generation trace, allowing teams to compare latency, cost, and evaluation scores across prompt changes.

SDK caching reduces prompt-fetch latency and availability risk, but it introduces cache and rollout behavior that should be understood. Define how applications behave when Langfuse is unreachable, which label represents production, and whether prompt changes require code review or a separate approval process.

Datasets, experiments, and production evaluation

Datasets provide stable examples for regression testing. Experiments can run a task against those items and attach scores from deterministic code, human reviewers, or an LLM judge. Online evaluators can score production traces to detect quality changes after release.

An evaluation score is only as credible as its rubric, examples, judge model, sampling, and agreement with human decisions. Use multiple measures for complex behavior, keep judge prompts versioned, inspect disagreement, and avoid turning one convenient score into a universal quality metric.

Costs, latency, sessions, and user analytics

Langfuse can calculate tokens and estimated model cost when model definitions and prices are known, while traces expose latency across the full request path. Sessions and user identifiers support product-level analysis such as repeated failures, long-running conversations, or high-cost workflows.

Cost dashboards are operational estimates, not an accounting ledger. Reconcile them with provider invoices, cache behavior, retries, gateway charges, and self-hosted inference costs before using them for financial reporting.

Cloud versus self-hosting

Langfuse Cloud removes most infrastructure work. Self-hosting provides control over network and data location but is no longer a single lightweight database deployment: current production architecture includes separate web and worker application containers, PostgreSQL for transactional state, ClickHouse for traces and scores, Redis or Valkey for queues and caching, and S3-compatible blob storage for raw events and large assets.

Production self-hosting requires backups, retention, migrations, UTC time configuration, monitoring, secrets, scaling, and version compatibility across the server and SDKs. Some enterprise capabilities live under a separate license even though the core platform is MIT-licensed.

Key features

  • LLM application traces with observations for generations, spans, retrieval, tools, agents, and custom logic.
  • OpenTelemetry-based instrumentation plus SDK and framework integrations for common AI stacks.
  • Prompt management with versions, labels, caching, configuration, playground testing, and trace linkage.
  • Datasets, experiments, human annotation, code evaluators, LLM-as-a-judge, and production scoring.
  • Dashboards and metrics for latency, errors, tokens, cost, model use, users, sessions, and custom dimensions.
  • Langfuse Cloud or self-hosting with web and worker services, PostgreSQL, ClickHouse, Redis or Valkey, and blob storage.

Common AI use cases

  • Debug a slow or incorrect RAG, agent, or tool-using request end to end.
  • Compare prompt versions by latency, cost, user feedback, and evaluation score.
  • Create regression datasets from production failures and rerun experiments before release.
  • Track token use, cost, model mix, errors, and latency by environment, user, session, or feature.
  • Run human annotation, code-based scoring, or LLM-as-a-judge on sampled production traces.
  • Monitor provider migrations or model upgrades for quality and cost regressions.

Business use cases

  • Shared quality and operations console for an AI product team.
  • Audit and debugging trail for customer-support or workflow agents.
  • Prompt-release process for product managers and domain experts.
  • Regression testing and quality gates before model or prompt changes.
  • Usage and cost attribution across internal AI applications.

How AI builders can use it

  • Define the request, user, session, environment, and observation taxonomy before instrumenting.
  • Capture only the fields required for debugging and evaluation, with a documented redaction policy.
  • Link managed prompts to generation observations and assign explicit development and production labels.
  • Turn representative failures into dataset items and create repeatable experiment tasks.
  • Add a small set of validated scores before expanding automated evaluation.
  • Monitor ingestion, storage growth, retention, and SDK/server compatibility.

Who should use it

  • Teams operating an LLM application beyond a simple prototype.
  • Developers debugging RAG, agents, tools, retries, and multi-step AI workflows.
  • Organizations that want prompt, trace, dataset, and evaluation workflows in one platform.
  • Teams requiring either managed cloud or open-source self-hosting.

Who should not use it

  • Very small prototypes that have no defined quality, latency, or cost questions yet.
  • Organizations unwilling to define a policy for sensitive prompts and outputs.
  • Teams expecting observability software to design evaluations automatically.
  • Self-hosters unprepared to operate PostgreSQL, ClickHouse, Redis or Valkey, blob storage, workers, and migrations.

Evaluation checklist

  • Which requests, spans, generations, retrieval steps, tools, users, and sessions must be traced?
  • What data must be redacted, sampled, encrypted, or excluded?
  • Which prompt changes can be deployed independently of application code?
  • What datasets and scores reflect real product success?
  • How will LLM judges be validated against human decisions?
  • What ingestion delay, trace loss, and SDK flush behavior are acceptable?
  • Will Langfuse Cloud meet data requirements, or is the self-hosted architecture justified?
  • How will retention, backups, upgrades, and server-SDK compatibility be managed?

Security and admin notes

  • Prompts, completions, retrieved context, tool arguments, traces, images, and user metadata can contain highly sensitive data.
  • Apply redaction or omission before export where possible rather than relying only on downstream deletion.
  • Use project-scoped keys, TLS, private networking, SSO or RBAC where available, and short-lived deployment secrets.
  • Encrypt PostgreSQL, ClickHouse, Redis or Valkey, and blob storage at rest and protect application encryption keys.
  • Do not expose Langfuse administrative or ingestion endpoints publicly without authentication and rate controls.
  • Review enterprise-license boundaries separately from the MIT-licensed core.

Pricing notes

Langfuse has an open-source core and commercial Cloud and enterprise packaging. Cloud pricing depends on current plan and usage. Self-hosting avoids a hosted subscription but requires application containers, PostgreSQL, ClickHouse, Redis or Valkey, blob storage, backups, upgrades, and operator time.

Tradeoffs

Langfuse creates a powerful improvement loop only when instrumentation and evaluation are thoughtfully designed. Rich traces can create privacy and storage risk, estimated costs need reconciliation, prompt management adds another deployment control surface, and production self-hosting is a multi-service data platform. The value is high for a real AI product and limited for a prototype without operational questions.

Recommended workflow

  • Instrument one critical workflow with a clear trace hierarchy.
  • Add privacy controls and verify trace completeness under failure.
  • Link production prompt versions to generations.
  • Create a small regression dataset from real examples.
  • Validate human and automated scores before setting gates.
  • Choose cloud or self-hosting based on data and operational requirements.

Pros

  • Connects traces, prompts, scores, datasets, and experiments in one workflow.
  • Strong open-source core with cloud and self-hosted options.
  • Purpose-built LLM concepts rather than generic application logs alone.
  • Broad SDK, OpenTelemetry, framework, and gateway integrations.
  • Useful for both debugging and systematic quality improvement.

Cons

  • Instrumentation quality determines usefulness.
  • Trace data can create major privacy and retention obligations.
  • Automated evaluations require careful validation.
  • Self-hosting has several required stateful infrastructure components.
  • Some administration and enterprise features require commercial licensing.

Alternatives

  • Arize Phoenix may be better for teams emphasizing self-hosted tracing and model or retrieval evaluation (note it is Elastic License 2.0, so source-available rather than open source).
  • Helicone may be better when an AI gateway and request observability are the primary need.
  • OpenLLMetry with a general observability backend may be better for teams standardized on OpenTelemetry infrastructure.
  • Weights & Biases Weave may be better when AI evaluation is already tied to the broader W&B platform.

FAQ

Does Langfuse add request latency?

SDKs generally queue and batch trace events asynchronously. Applications still need correct flush and failure handling, especially in short-lived jobs or serverless functions.

Is Langfuse only a tracing tool?

No. It also includes prompt management, datasets, experiments, evaluations, annotation, metrics, dashboards, and playground workflows.

Can Langfuse be self-hosted?

Yes. Current production self-hosting uses web and worker services plus PostgreSQL, ClickHouse, Redis or Valkey, and blob storage.

Are cost numbers exact?

They are useful estimates based on captured usage and model pricing. Provider invoices, caches, retries, gateway fees, and self-hosted compute should be reconciled separately.

Does Langfuse evaluate my application automatically?

It provides evaluation infrastructure, but teams must define datasets, rubrics, evaluators, sampling, and acceptance criteria.

Official verification sources

Direct official links used to verify pricing, features, security claims, and product packaging.

CategoryEvaluation and observabilityLicenseMITDeploymentSelf-hosted via Docker Compose with PostgreSQL, or Langfuse Cloud managed service with free and paid tiersModeSelf-hosted or cloud
Langfuse GitHub

OpenSourcesAI ecosystem connections

Use these next-step links to move from this profile into related tools, comparisons, guides, stacks, and curated shortlists.