Langfuse Integration with Vapi
Langfuse Integration
Vapi natively integrates with Langfuse, allowing you to send traces directly to Langfuse for enhanced telemetry monitoring. This integration enables you to gain deeper insights into your voice AI applications and improve their performance and reliability.
This page covers connecting Langfuse to Vapi. For Langfuse’s own guide to working with traces once they arrive, see the Langfuse tracing documentation.
What is Langfuse?
Langfuse is an open source LLM engineering platform designed to provide better observability and evaluations into AI applications. It helps developers track, analyze, and visualize traces from AI interactions, enabling better performance tuning, debugging, and optimization of AI agents.
Get Started
Get your Langfuse Credentials
First, you’ll need your Langfuse credentials:
- Secret Key
- Public Key
- Host URL
You can obtain these by signing up for Langfuse Cloud or self-hosting Langfuse.
Add Langfuse Credentials
Log in to your Vapi dashboard and navigate to the Integrations page.
Under the Observability Providers section, you’ll find an option for Langfuse. Enter your Langfuse credentials:
- Secret Key
- Public Key
- Host URL (US data region:
https://us.cloud.langfuse.com, EU data region:https://cloud.langfuse.com)
For a self-hosted server, when you finish editing the Host URL, Vapi reads your Langfuse server’s version from its unauthenticated {Host URL}/api/public/health endpoint, and the Server version row fills in with what it found. You can also trigger the check yourself with Check server version. Save stays disabled until a version is resolved, so every saved self-hosted credential knows which server it points at. Editing the Host URL clears the version, because a version belongs to the server it was read from.
A Langfuse Cloud Host URL needs no version: Cloud is recognized by its hostname, so Save is available right away and nothing is checked when you leave the field. Check server version still reads Cloud’s version if you want to see it.
If your /api/public/health endpoint is hidden behind a proxy or firewall, a Server version field appears so you can state the version yourself (for example 3.63.0). The Host URL itself must still use https:// and resolve to a public address. Vapi only sends your keys over an encrypted connection, and it probes and exports from the public internet, so an http:// Host URL, or one that resolves to a loopback, link-local, or private-network address, is refused regardless of the version you enter.
Click Save to update your credentials.

See Traces in Langfuse
Once you’ve added your credentials, you should start seeing traces in your Langfuse dashboard for every conversation your agents have.

Example trace in Langfuse: https://cloud.langfuse.com/project/cloramnkj0002jz088vzn1ja4/traces/50163c14-9784-4cb9-b18e-23e924d0bb66
Evaluate and Debug your Agent
To make the most out of this integration, you can now use Langfuse’s evaluation and debugging tools to analyze and improve the performance of your voice AI agents.
If you are on Langfuse Cloud and already run LLM-as-a-judge evaluators, note that Langfuse retires its legacy evaluators on November 16, 2026; their migration guide covers the upgrade, and their UI walks you through it.
Server Version Detection and SDK Routing
Vapi exports traces over two paths: the modern OpenTelemetry (OTLP) path of the Langfuse JS SDK v5, and the legacy v3 ingestion API. Which one your credential uses follows the Langfuse server version resolved when you saved it:
- Langfuse Cloud always uses the OTLP path. Cloud is recognized by its hostname, so this applies to credentials saved at any time, including before this feature existed. All Cloud regions are supported:
us.cloud.langfuse.com,hipaa.cloud.langfuse.com,jp.cloud.langfuse.com, andcloud.langfuse.com. - Self-hosted on 3.63 or later uses the OTLP path, once the credential has a detected server version.
- Self-hosted on versions earlier than 3.63, and any self-hosted credential with no detected version, continues on the legacy v3 ingestion API.
If you self-host and saved your credential before version detection existed, it has no stored version, so your traces stay on the legacy path. That is a working path and nothing is interrupted, but upgrading your Langfuse server alone will not move you: re-save the credential in the Vapi dashboard so Vapi reads your server’s current version. Nothing re-probes on its own, and the stored version changes only when you save again.
Self-hosted Langfuse v3 remains supported through the upstream v3 patch window ending January 31, 2027.
Langfuse Cloud removes its legacy ingestion API and legacy features on November 16, 2026, in every region. Vapi’s own export is handled: Cloud credentials use the OTLP path, so your traces keep arriving. The one thing that may need your attention is in your Langfuse project rather than in Vapi: if you use Langfuse’s legacy LLM-as-a-judge evaluators, migrate them before that date. See Langfuse’s LLM-as-a-judge migration guide and their v4 upgrade guide. Self-hosted servers are unaffected by this date and upgrade on your own schedule.
Trace IDs and Call Correlation
On the OTLP export path, a trace ID is an OpenTelemetry trace ID: exactly 32 hexadecimal characters. A Vapi call ID is a UUID, so it cannot be used as a trace ID directly. Vapi therefore derives the trace ID from the call ID, as the first 32 hex characters of its SHA-256 hash. The derivation is deterministic, so the same call always produces the same trace ID.
Every trace also carries the call ID as metadata.callId, which is the recommended way to correlate. Filtering and searching by call ID in the Langfuse UI is unaffected.
On the legacy v3 path, a trace’s ID was the Vapi call ID verbatim. If your own code reads or writes Langfuse traces by using a call ID as the trace ID, for example scoring a trace from an end-of-call webhook, update it to either filter on metadata.callId or compute the derived ID.
Computing the derived trace ID:
Troubleshooting
The Host URL redirects to another origin. Host URLs that redirect elsewhere are refused, because trace exports do not follow redirects: the save would succeed and the exports would silently go nowhere. For example, https://eu.cloud.langfuse.com redirects to https://cloud.langfuse.com, so use https://cloud.langfuse.com directly, which is Langfuse’s recommended base URL for EU-region projects and does not change where your data is stored. The error message names the URL to use instead.
The Host URL must use HTTPS and resolve to a public address. Vapi only sends your keys over an encrypted connection, so an http:// Host URL is refused when you save, with a message asking for an https:// one. Vapi also probes and exports from the public internet, so a Host URL that resolves to a loopback, link-local, or private-network address is refused. Entering a server version by hand bypasses neither rule. A credential saved earlier with an http:// Host URL keeps sending traces over the legacy v3 ingestion API, but saving it again requires an https:// Host URL.
Vapi could not detect your server’s version. This means {Host URL}/api/public/health did not answer, or answered without a version, which is typical when a proxy or firewall sits in front of it. Enter your server’s version yourself in the Server version field, as major.minor.patch exactly how your server’s health endpoint reports it (for example 3.63.0).
Traces stop appearing during calls. On the OTLP path, if a call’s trace cannot be started or delivered, for example because your server became unreachable or was upgraded across the 3.63 boundary, Vapi writes an error into that call’s logs with a link to the Integrations page. Re-save your Langfuse credential there so Vapi reads your server’s current version; nothing re-detects it in the background.
No traces from PCI calls. When an assistant has compliancePlan.pciEnabled set, Vapi sends nothing from its calls to Langfuse: no conversation traces and no tool calls. This applies on both export paths.
Enrich Traces
Vapi allows you to enrich Langfuse traces by integrating Metadata and Tags.
By default, we will add the following values to the metadata of each trace:
call.metadataassistant.metadataassistantOverrides.metadataassistantOverrides.variableValues
Usage
You can enhance your observability in Langfuse by adding metadata and tags:
Metadata
Use the assistant.observabilityPlan.metadata field to attach custom key-value pairs.
Examples:
- Track experiment versions (“experiment”: “v2.1”)
- Store user segments (“user_type”: “beta_tester”)
- Log environment details (“env”: “production”)
On the Langfuse JS SDK v5 export path, each top-level metadata key becomes one trace attribute, and nested values are serialized as JSON strings. A trace keeps at most 512 metadata keys; any keys beyond the first 512 are dropped. Vapi’s own identifiers, such as the call ID, are added separately and are always kept, even if your metadata uses the same key name. Keep metadata to a small set of filterable values and store large payloads elsewhere, referencing them by ID.
Tags
Use the assistant.observabilityPlan.tags field to add searchable labels.
Examples:
- Mark important runs (“priority”)
- Group related sessions (“onboarding”, “A/B_test”)
- Filter by feature (“voice_assistant”)
Adding metadata and tags makes it easier to filter, analyze, and monitor your assistants activity in Langfuse.
Example
