Linking Langfuse as a source
This source is currently in alpha. The interface and available tables may change.
Let AI connect your sources for you
Skip the manual setup — run this in your project and the wizard auto-detects your databases and APIs and connects them to PostHog.

Contents
The Langfuse connector syncs your LLM observability data – observations, evaluation scores, prompts, models, and datasets – into PostHog, so you can analyze your AI application's behavior, cost, and quality alongside your product data. It works with Langfuse Cloud (all regions) and self-hosted Langfuse instances.
Note: New Langfuse sources use API version v3, which doesn't include the
tracesandsessionstables. Trace and session data is available through theobservationstable, which includestraceId,sessionId,userId,traceName,tags, andreleasefields. Existing sources on v1/v2 that sync these tables continue to work until November 16, 2026. See API versions for details.
Prerequisites
You need a Langfuse project and its API key pair. API keys are project-scoped and available on all Langfuse plans. Self-hosted users also need a publicly reachable Langfuse host.
Adding a data source
- In PostHog, go to the Sources tab of the data pipeline section.
- Click + New source and click Link next to this source.
- Enter your credentials (see Configuration below) and click Next.
- Select the tables you want to sync, choose a sync method and frequency, then click Import.
Once the syncs are complete, you can start querying this data in PostHog.
When linking Langfuse, you'll need:
- Public key and Secret key – find both in the Langfuse dashboard under Project settings > API keys.
- Host – set it to your Langfuse region:
https://cloud.langfuse.com(EU, the default),https://us.cloud.langfuse.com(US),https://jp.cloud.langfuse.com(JP), orhttps://hipaa.cloud.langfuse.com(HIPAA). Self-hosted users should set it to their own Langfuse host. Leave it blank to use Langfuse Cloud EU.
Sync modes
Each table can be synced in one of several modes, depending on what the source supports:
- Webhook (when available) – the source pushes changes to PostHog in real time. Fastest freshness, lowest ongoing cost, and the only mode that reliably captures updates and deletes.
- Incremental – only new or updated rows are synced on each run, using a cursor field (such as an
updated_attimestamp). Cheaper than a full refresh, but deletes aren't captured. - Append only – new rows are appended using a cursor field; existing rows are never updated. Ideal for immutable, append-only tables like event logs.
- Full refresh – the whole table is reloaded on every sync. Use it when a table has no reliable cursor or when you need deletions reflected.
See sync methods for a full explanation of how each mode works and how to choose between them.
Observations, scores, and prompts support incremental sync using Langfuse's creation/start-time filters. Each incremental run re-reads a trailing one-hour window to pick up late-arriving updates. Prompts also sync incrementally, using the last-updated filter. Datasets, dataset items, and models are full refresh only.
On legacy v1/v2 sources, traces and sessions also support incremental sync.
API versions
New Langfuse sources use API version v3 by default.
- v3 syncs observations, scores, prompts, datasets, dataset items, models, score configs, annotation queues, and annotation queue items. It doesn't include the
tracesorsessionstables. - v1 and v2 are deprecated and sunset on November 16, 2026. After that date, Langfuse Cloud stops serving the
tracesandsessionsendpoints, and syncs for those tables fail.
Trace and session data is available on v3 through the observations table, which includes traceId, sessionId, userId, traceName, tags, and release fields. You can reconstruct trace- or session-level views by grouping observation rows by traceId or sessionId in a SQL insight.
Migrating from v1/v2
If your source syncs traces or sessions, you need to migrate before November 16, 2026:
- Make sure the
observationstable is syncing. - Update queries that use the
tracesorsessionstable to useobservationsinstead, grouping bytraceIdorsessionId. - Contact support to repin your source to v3. On the next sync, the
tracesandsessionsschemas show as disabled and existing warehouse tables keep their data.
Sources on v1/v2 that don't sync traces or sessions are automatically migrated to v3.
Configuration
| Option | Type | Required |
|---|---|---|
Host | text | No |
Public key | text | Yes |
Secret key | password | Yes |
Supported tables
| Table | Description | Sync method | Incremental field | Primary key |
|---|---|---|---|---|
observations | Individual units of work within a trace: LLM generations, spans, tool calls, and events, with token usage, cost, and latency detail. | Incremental, Full refresh | startTime | — |
scores | Evaluation scores attached to traces, observations, sessions, or experiments. The value type depends on dataType (numeric, boolean, categorical, text, or correction). | Incremental, Full refresh | timestamp | — |
prompts | Prompts managed in Langfuse prompt management, one row per prompt name with its versions and labels. | Incremental, Full refresh | lastUpdatedAt | — |
datasets | Datasets of test inputs and expected outputs used for experiments and evaluation. | Full refresh | — | — |
dataset_items | Individual items within datasets: an input, an optional expected output, and links back to the trace or observation that sourced them. | Full refresh | — | — |
models | Model definitions used for matching generations to models and computing token usage and USD cost. | Full refresh | — | — |
score_configs | Score configurations that define the name, data type, and allowed values of the scores attached to traces, observations, and sessions. | Full refresh | — | — |
annotation_queues | Annotation queues that collect traces, observations, or sessions for human review against a set of score configs. | Full refresh | — | — |
annotation_queue_items | Items in annotation queues: one trace, observation, or session waiting for or finished with human review. | Full refresh | — | — |
Troubleshooting
- If you see an invalid key error, confirm the public/secret key pair in Project settings > API keys and make sure the host matches your project's region – keys only work against the region they were created in.
- Langfuse rate limits its read APIs by plan (as low as 15 requests/minute on the Hobby plan). The connector backs off and retries automatically, but large first syncs on lower plans can take a while.
- If the host is not allowed, use a publicly reachable host.
If your sync is failing or data looks wrong, see the Data warehouse troubleshooting guide. If that doesn't help, contact support – we're happy to help.











