Skip to main content

Langfuse Setup Guide

This guide walks through deploying Langfuse and connecting it to your CRAFT solutions. Langfuse provides LLM call tracing, evaluation, and prompt management for Data Insights, Data Governance, and Semiconductor solutions.

Prerequisites

  • A running CRAFT deployment (any version)
  • Docker and Docker Compose (for Docker deployment) or a Kubernetes cluster
  • Domain name for the Langfuse instance (recommended for production)

Step 1: Deploy Langfuse

Edit .env.local with your configuration:
Start the services:
Langfuse is now available at http://localhost:3000 (or your configured domain).

Step 2: Create a Langfuse Project

  1. Navigate to your Langfuse instance
  2. Sign up for an account (or log in with the admin account)
  3. Create a new Project for each solution you want to trace:
    • data-insights, for Data Insights traces
    • data-governance, for Data Governance traces
    • semiconductor, for Semiconductor traces
  4. In each project, go to Settings → API Keys and copy the Public Key and Secret Key

Step 3: Store Credentials

Store Langfuse credentials as Kubernetes Secrets (or in your Secrets backend):

Step 4: Configure Solutions

Set the Langfuse environment variables in each solution’s Helm values:

Data Insights

Data Governance

Same configuration, referencing the data-governance project keys:

Semiconductor

Apply to both the Backend API and AI Agent services:

Step 5: Verify Traces

After deploying the configuration, trigger an LLM call in any solution:
  1. In Data Insights: ask a natural language question
  2. In Data Governance: run a profiling job
  3. In Semiconductor: send a chat message to the AI agent
Then check the Traces tab in Langfuse, you should see the call appear within seconds.

Troubleshooting

  1. Verify LANGFUSE_HOST, LANGFUSE_PUBLIC_KEY, and LANGFUSE_SECRET_KEY are set correctly in the pod
  2. Check that the Langfuse host is reachable from the pod: kubectl exec -it <pod> -- curl -I https://langfuse.example.com
  3. Check solution logs for Langfuse callback errors
  4. Verify the public key corresponds to the correct Langfuse project
  1. Check pod status: kubectl get pods -n langfuse
  2. Check worker logs: kubectl logs -n langfuse -l app=langfuse-worker
  3. Verify the NEXTAUTH_URL matches the URL you’re accessing