Langfuse v4
Langfuse v4 rebuilds the data model around observations: trace-level attributes live on every observation, which removes expensive joins and makes queries an order of magnitude faster at scale. This page is the starting point for upgrading. Find your situation below, follow the steps, and check the Versions & Compatibility page for the full matrix.
New to Langfuse? There is nothing to migrate. Start with the get started guide; it already uses v4.
Timeline
| Date | What happens | Who is affected |
|---|---|---|
| August 1, 2026 | v4 ships for self-hosted deployments | Self-hosters |
| End of October 2026 | Langfuse Cloud switches to v4 as the only experience; the "Preview" toggle is removed | All Langfuse Cloud users |
| November 30, 2026 | Legacy surfaces are removed on Langfuse Cloud: v1 read APIs, legacy trace ingestion, legacy export sources | Cloud users on Python SDK v2 / JS SDK v3, v1 read APIs, or legacy exports |
On Langfuse Cloud, review your project's remaining migration actions directly in the app.
What you need to do
Langfuse Cloud with older SDKs (Python v2 / JS v3 or older)
Deadline: November 30, 2026. These SDKs send traces via the legacy ingestion API, which is removed on that date; trace ingestion stops working. Score ingestion is unaffected.
- Upgrade to Python SDK v4 or JS/TS SDK v5 (the guides cover each major-version hop).
- Replace
update_current_trace()/updateActiveTrace()withpropagate_attributes(); it pushesuser_id,session_id,tags, andmetadatato all child observations. - Verify in the in-app migration view that no required actions remain.
Langfuse Cloud with current SDKs (Python v3+ / JS v4+)
Deadline: November 30, 2026 for the v1 read APIs and trace-level evaluators; the SDK upgrade itself is recommended before the end of October 2026 so your data stays real time.
- Upgrade to Python SDK ≥ 4.7.0 / JS SDK ≥ 5.4.0. Below these versions, data appears with up to a 10-minute delay on the v4 data model.
- Replace
update_current_trace()/updateActiveTrace()withpropagate_attributes()(Python guide, JS guide). - Move reads from the v1 endpoints (
api.legacy.*, or theapi.observations/api.metricsdefaults of SDK v3/v4) to the Observations API v2 and Metrics API v2. - Migrate trace-level LLM-as-a-judge evaluators to the observation level.
Self-hosted deployments
No forced deadline. v4 ships by August 1, 2026; v3 continues to receive security patches. Upgrade at your own pace, in this order:
- Upgrade SDKs first: Python SDK v4 / JS/TS SDK v5. Python SDK v2 and JS SDK v3 cannot send traces to a v4 server.
- Migrate trace-level evaluators and legacy export sources, if you use them (see what changed).
- Upgrade the server from v3 to v4 following the upgrade documentation.
- After the server upgrade, switch API reads from
api.legacy.*to the defaultapi.observations/api.metrics; the v2 endpoints are now served by your deployment.
Direct API and OpenTelemetry users
Deadline: November 30, 2026 for the v1 read APIs on Langfuse Cloud.
- OpenTelemetry: set the
x-langfuse-ingestion-version: 4header on your span exporter for real-time data, and propagate trace attributes (user_id,session_id, ...) to all spans (setup guide). - REST: move v1 reads to
GET /api/public/v2/observations?fromStartTime={datetime}&toStartTime={datetime},GET /api/public/v2/metrics?query={json}, andGET /api/public/v3/scores. The full endpoint list with replacements is in the compatibility matrix. - Exports: switch blob storage, PostHog, and Mixpanel integrations from the legacy "traces and observations" source to "enriched observations". Remaining legacy exports are switched automatically on November 30, 2026.
What changed
| Before (v3) | After (v4) |
|---|---|
| Separate, mutable traces and observations tables | Single immutable observations table; a trace is the set of observations sharing a trace_id |
| Trace attributes stored on the trace, joined at query time | Trace attributes live on every observation, propagated by the SDKs |
update_current_trace() / updateActiveTrace() | propagate_attributes() |
| Trace input/output | Observation input/output (set_trace_io remains as a deprecated fallback for legacy trace-level evaluators) |
| v1 read APIs (observations, metrics, traces, sessions, scores v1/v2) | Observations API v2, Metrics API v2, Scores API v3 |
| Legacy batch ingestion for trace, span, and generation events | OTLP endpoint POST /api/public/otel/v1/traces |
| Trace-level LLM-as-a-judge evaluators | Observation-level evaluators |
| Export source "traces and observations" | Export source "enriched observations" |
Why observations-first: agentic applications produce traces with hundreds of operations, and the operations engineers care about were hidden inside one trace row. With observations as the primary entity you query the operations directly ("which LLM calls are slow?"), charts load faster over large time ranges, and observation-level evaluations run in seconds. The data model docs explain the model; the observations guide covers day-to-day workflows in the UI.
Cloud rollout details (until the end of October 2026)
- Organizations created on or after April 14, 2026, 14:00 UTC run v4 by default and do not see a toggle.
- Organizations created before that date can switch the Preview toggle (bottom-left in the UI) on and off until Langfuse Cloud becomes v4-only at the end of October 2026.
- Cloud projects created on or after May 20, 2026 are locked to the "enriched observations" export source; new legacy export integrations cannot be created since June 22, 2026.
Questions
Ask rollout and migration questions in the dedicated GitHub Discussion; we use that thread for updates and answers.
Last edited