Connect Langfuse to Rig

    Rig syncs the traces, scores, datasets and experiments from one Langfuse project, so you can join LLM behaviour to product and cost data in your warehouse. You connect with a public and secret key pair from that project.

    Before you start

    • You need access to the Langfuse project you want to sync. API keys belong to a single project, so add one connection per project.
    • Know where your project lives. Langfuse cloud uses https://cloud.langfuse.com for the EU region and https://us.cloud.langfuse.com for the US region. Self-hosted installs use their own address.

    Step 1: Create a Langfuse API key pair

    1. Open your project in Langfuse and go to Project Settings.
    2. Open API Keys and click Create new API keys.
    3. Name the key, keep Full access, and click Create API key.
    4. Copy the public key (pk-lf-...) and the secret key (sk-lf-...). Langfuse shows the secret key once, so store it before you close the dialog.

    Step 2: Connect it in Rig

    Adding a source needs a workspace owner, or a role with the Manage connections permission, on a workspace where you manage your own connections. If the Connectors tab says “Data ingestion for this workspace is managed by Rig”, ask an owner or Rig support to add the source.

    1. In Rig, open Connections, choose the Connectors tab and go to Sources & actions.
    2. Search for Langfuse, open the card and click Connect.
    3. Langfuse public key (pk-lf-...): The public key you copied.
    4. Langfuse secret key (sk-lf-...): The secret key you copied.
    5. Langfuse host: Leave it as it is for the EU cloud. For the US cloud enter https://us.cloud.langfuse.com. For a self-hosted install enter its address.
    6. Click Continue. Rig checks the credentials and lists the streams it can reach, so choose the ones you want and click Connect.
    7. The source then syncs on its schedule, which is nightly unless you change it. To load data straight away, click Sync on its row; Test pulls a small sample first if you want to check the connection.

    What Rig pulls in

    Langfuse lands in its own langfuse schema in your warehouse:

    • Traces: One row per trace, with its name, tags, release and session ID.
    • Observations: Every span, generation and event inside a trace. Off by default, because it is the largest table. Turn it on when you need token and cost detail.
    • Scores: Evaluation scores attached to traces and observations.
    • Datasets and dataset items: Your evaluation datasets and the items in them.
    • Experiments: Runs of a dataset against a prompt or model.

    Rig reads the current Langfuse v4 API. It has no sessions table, but every trace and observation row carries a sessionId, so you can group by it.

    Good to know

    • A trace row is the root observation of the trace. Its id is the observation ID, and the trace ID sits in traceId, which is the column to join on.
    • Langfuse truncates metadata values longer than 200 characters when it returns observations, so very long metadata arrives shortened.
    • Add a separate connection for each Langfuse project, because each key pair opens only one.
    • To disconnect Langfuse, click the bin icon on the source's row under Sources & actions. Only whoever connected the source or a workspace owner can do this, and data already synced stays in the warehouse.

    What people use this for

    • Analyse token cost and LLM spend
    • Track latency and error rates by feature
    • Measure quality scores and experiment results
    • Analyse trace volume and usage by feature

    More ideas for using Langfuse

    Was this guide helpful?