Langfuse — Quick Reference
Open-source LLM observability · work context · → Lesson 1
The "Lang" family — Build vs Observe (memorise this)
Four tools, two jobs. The shared prefix is a trap; they are not the same layer.
| Tool | Layer | Job | License |
| LangChain | BUILD | Framework to assemble LLM apps — chains, prompts, tools, RAG. | MIT |
| LangGraph | BUILD | Build stateful, cyclical agents as graphs (state machines). Part of the LangChain ecosystem. | MIT |
| LangSmith | OBSERVE | Trace/eval platform, native to LangChain/LangGraph. Closed source. | Proprietary |
| Langfuse | OBSERVE | Trace/eval platform, framework-agnostic. Works with any stack. | MIT core |
Rule of thumb: LangChain/LangGraph = how you BUILD the app. LangSmith/Langfuse = how you OBSERVE it. Langfuse competes with LangSmith, not with LangChain.
Langfuse vs LangSmith (mid-2026, grounded)
| Dimension | Langfuse | LangSmith |
| License | MIT core (+ /ee enterprise folders) | Closed source |
| Self-host | Free, first-class, ~full parity | Enterprise plan only (paid contract) |
| Framework fit | Framework-agnostic (100+ integrations) | LangChain/LangGraph-native (zero-setup) |
| OpenTelemetry | Native — SDKs built on OTel | Ingests + exports OTel, but tuned for native SDK |
| Pricing model | Per unit (trace/observation/score) | Per trace + per seat |
| Free tier | 50k units/mo | 5k traces/mo, 1 seat |
| ≈ Cost @ 1M events/mo | ~$101 (Core, unlimited users) | ~$2,514 (1 seat, 14-day retention) |
| Alerting | Webhooks only (no native paging) | Native + PagerDuty |
| Backend data layer | ClickHouse + Postgres (open, SQL access) | Proprietary / managed |
| Runs your agents? | No | Yes — managed LangGraph runtime |
ClickHouse acquired Langfuse on 16 Jan 2026 and preserved the MIT license + free self-hosting. The same ClickHouse engine Langfuse already runs on now backs it directly — stability signal for self-hosters.
What Langfuse IS
- Tracing — hierarchical traces: LLM generations, tool calls, retrieval/embedding steps, spans. Filter by user, session, cost, latency.
- Evaluations — LLM-as-a-judge, code/heuristic evaluators, human annotation queues, datasets & experiments.
- Prompt management — version, deploy, roll back prompts separately from code. Edge-cached (no added latency).
- Playground — iterate prompts on real production inputs; compare models side by side.
- Cost & latency — per-model cost tracking, dashboards.
What Langfuse is NOT (do not adopt it for these)
- Not a framework to build agents — that's LangChain/LangGraph or your own loop.
- Not a model or gateway — pair it with LiteLLM/a gateway if you need routing.
- Not general app observability — not a Datadog/Grafana/SigNoz replacement. Run it alongside infra metrics/logging.
- Not a cross-run failure classifier — it shows individual traces; it does not tell you "your agent is stuck in a loop across 4k runs." That needs a per-turn classifier on top.
- Not useful without LLM calls. A pure CRUD/Go service with no GenAI gets ~zero value.
Go instrumentation — the practical path
There is no native Go SDK. Go integrates via OpenTelemetry — Langfuse is an OTel backend. Our shared HTTP library already injects OTel (otel.GetTextMapPropagator().Inject), so adding Langfuse is largely a config change: point the OTLP exporter at it.
import (
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp"
"go.opentelemetry.io/otel/sdk/trace"
)
exp, _ := otlptracehttp.New(ctx) // reads OTEL_EXPORTER_OTLP_* env vars
tp := trace.NewTracerProvider(trace.WithBatcher(exp))
otel.SetTracerProvider(tp)
defer tp.Shutdown(ctx) // flush before exit or short-lived progs lose spans
Caveat for the rich LLM UI: plain OTel spans render as generic traces. To get the model/prompt/token/cost cards in Langfuse, spans must carry GenAI semantic-convention attributes (gen_ai.*). For Python/TS services, the native SDK / OpenAI drop-in wrapper does this for free.
Self-host footprint (v3 — 6 moving parts)
| Component | Role |
| Langfuse web + worker containers | App + async ingestion |
| PostgreSQL | Transactional data (users, projects, config) |
| ClickHouse | OLAP trace/observation/score store (the hot path) |
| Redis / Valkey | Ingestion queue + cache |
| S3-compatible blob | Large payloads (prompt I/O bodies) |
docker compose up for dev in ~5 min. Production = Kubernetes (Helm) or Terraform (AWS/Azure/GCP). Heavier than a single binary — if you can't operate ClickHouse, self-host is off the table.
License reality (the GitHub "NOASSERTION" scare)
GitHub shows "Other (NOASSERTION)" because of mixed licensing, not a red flag. Core = MIT. Enterprise code lives in clearly-marked /ee folders (SCIM, audit logs, data-retention policies, org creators, instance-mgmt API, UI customisation) — shipped as source, dormant unless a license key is provided. Everything product-facing (tracing, evals, prompt mgmt, playground, datasets, annotation) is MIT with no usage limits. Fork, modify, ship — even commercially.
Decision tree — should we use it?
1. Does the system make ANY LLM / GenAI call?
NO → Langfuse is useless here. Stop.
YES → continue.
2. Must traces stay in our VPC, or do we want open source / $0 self-host?
YES → Langfuse self-host. (ends the conversation)
3. Are we all-in on LangChain/LangGraph, AND want zero-setup tracing,
native alerting, and a managed agent runtime?
YES → LangSmith.
NO → Langfuse.
4. Mixed frameworks, or hedging framework bets?
→ Langfuse (OTel-native, portable).
Either way: instrument on OpenTelemetry → the backend stays an env-var swap away.
Pricing snapshot (verify before quoting — changes)
| Langfuse | LangSmith |
| Free | 50k units/mo, 2 users | 5k traces/mo, 1 seat |
| First paid | Core $29/mo, 100k units, unlimited users | Plus $39/seat/mo, 10k traces |
| Overage | $8 / 100k units (→$6 at 50M+) | $2.50 / 1k traces (14-day) |
Sources: langfuse.com/docs, github.com/langfuse/langfuse, open-source handbook, Langfuse LangSmith-alternative page, issue #9521 (license wording). Comparison figures cross-checked vs third-party writeups (mid-2026).