Overview
Voiceflow integrates with Langfuse through request instrumentation in the backend behind your custom Chat interface. Your developer exports an OpenTelemetry span around each non-streaming Chat action; your CX team uses those traces to investigate the customer experience.
- Connect Langfuse to the intended project or workspace.
- Trace Chat requests while preserving application behavior.
- Review CX performance against actual conversation evidence.
- Maintain export through releases and credential changes.
This guide instruments your custom Chat backend. Voiceflow’s widget and phone channels do not expose their internal requests through this wrapper. Use Transcripts, Evaluations and lifecycle webhooks for those channels’ evidence. Connecting an observability platform does not automatically export prompts, answers, model spans or quality scores.
Connecting Langfuse
Authorize the destination and prove the exporter reaches it.
Before you begin
You need a Langfuse project and its project-scoped public and secret API keys, plus the region or self-hosted URL for that project. You also need a developer who can change and deploy the server behind your custom Chat interface. Studio builders can coordinate setup and review; the request instrumentation itself runs on that server.
Studio
Prepare the destination
In the intended project’s Settings → API Keys, create a key pair. Supply both values to the backend. Choose the project’s region: the supplied file uses EU cloud.langfuse.com; US uses us.cloud.langfuse.com. Keep the secret key server-side even though its partner is named public.
Assign the exporter setup
Ask the developer who owns your custom Chat backend to use the tracing starter with its langfuse.env.example configuration. Supply the destination identifiers, environment label and an approved sandbox conversation. Keep credentials in the backend’s secret store. Ask for a connection-check result and a link to the resulting trace.
Confirm the destination
In the configured project, find voiceflow.connection.check in the tracing/observations view.
Check that the destination belongs to the intended organization and staging environment before the developer enables broader traffic.
Code
Provision the destination
In the intended project’s Settings → API Keys, create a key pair. Supply both values to the backend. Choose the project’s region: the supplied file uses EU cloud.langfuse.com; US uses us.cloud.langfuse.com. Keep the secret key server-side even though its partner is named public.
Use API keys and endpoint from the same project/region. A display name is not an authorization or routing key. Direct OTLP observation attributes must accompany each exported span when you later add child spans.
Configure the explicit HTTP exporter
Extract the tracing starter. In otel, create a Python 3.11+ environment and install python -m pip install -r requirements.txt. The example pins OpenTelemetry SDK and HTTP exporter 1.45.2.
Copy langfuse.env.example to an untracked provider.env file, replace its placeholders and load it into your backend environment:
Use set -a; . ./provider.env; set +a for a local POSIX shell, or the host’s secret/config store for deployment. The Langfuse HTTP OTLP endpoint ends in /api/public/otel/v1/traces. It uses Basic authentication with public:secret. The starter also sets x-langfuse-ingestion-version: 4 for the current v4 ingestion behavior; it does not use the retired legacy tracing ingestion API.
Send a connection check
Run python voiceflow_monitoring.py langfuse --send-smoke. This deliberately sends one metadata-only voiceflow.connection.check span; it makes no Voiceflow call. Read exporter diagnostics and confirm the resulting record:
In the configured project, find voiceflow.connection.check in the tracing/observations view.
An exporter flush finishing is not proof of remote acceptance. Continue only after the correct destination displays the span.
The expected trace is missing
Check intake, authentication and destination routing.
Check the Basic key-pair order, project region and full signal URL. For current v4 deployments retain the ingestion-version header. Do not fall back to older /api/public/ingestion trace calls; check version compatibility when maintaining an older self-hosted instance. Check exporter diagnostics, the selected time range and the intended project. Retrying trace delivery must not repeat a Voiceflow customer action.
Tracing Chat requests
Measure non-streaming requests in the backend you own.
The span covers your server’s outbound /v4/interact request and JSON response read. It excludes browser rendering and streaming Voice, and is not an internal LLM call. Non-2xx responses mark an error and preserve the original response. Network/decoding errors propagate through your existing recovery path without exporting their messages.
Studio
Run a real Chat turn
Ask a sandbox question through the custom interface your developer instrumented. Confirm the customer sees its normal response. Use a follow-up in the same application conversation so you can check correlation across turns.
Review healthy and failed requests
After a real application turn, open voiceflow.chat.turn and verify its session ID, duration and HTTP result.
Have your developer test a controlled failure and an unavailable telemetry destination. Confirm export problems do not replace the customer’s real response or trigger a repeated action.
Code
Retain session ownership
Your backend creates a session, stores the returned sessionKey, launches once and reuses that session for authorized follow-ups. Generate a separate random application conversation ID and keep its session mapping server-side. Neither the key nor a customer contact detail belongs in telemetry.
Instrument the existing call
Use this synchronous wrapper in a sync handler/worker. For an async framework, place the same span around your existing async HTTP client rather than blocking the event loop. Keep your customer authorization and response handling intact.
Test error and delivery behavior
Run the included python -m unittest -v test_monitoring.py, then test an authorized sandbox success and failure through the real backend. The wrapper uses an isolated provider and a background batch processor, so it does not replace the process-global OTel provider. Monitor exporter failures; a short-lived host must await export before it terminates.
session.id groups these turns in Langfuse. The example does not send user IDs, prompts or outputs; an empty content panel is expected until your team deliberately supplies approved review data.
The trace has no prompts or model costs
Check what your instrumentation actually observes.
That is expected for this recipe: only request metadata is exported. Do not label the span as an LLM call or estimate token usage from HTTP duration. To review answers, deliberately obtain and redact the needed conversation evidence; instrument only tools or model calls your application actually owns.
Reviewing CX performance
Connect request health to actual customer evidence.
Inspect a request
Open the request and its session. The starter supplies session.id on every request span and identifies the observation as a chain. Compare successive turns with the same application conversation ID.
Run a small CX review
Select comparable conversations
Choose a release, environment, intent and fixed time window. Start with a small support scenario such as a returns-policy question and a follow-up. Include failed and healthy requests; trace sampling is not a representative customer population by itself.
Check the actual answer
Use the opaque conversation mapping to find approved evidence in your app or Voiceflow’s Transcripts. Compare the answer with the source policy and any tool result. Record pass, fail or not assessed against the same rubric. The metadata-only trace cannot supply missing conversation content to a reviewer or judge.
Record and compare findings
Keep the trace ID with the outcome, rubric version and review window in your team’s review record. If you add platform scores or automated evaluation later, configure their evidence and mapping explicitly; an available evaluation API does not create scores for this integration. Compare the same population before and after an agent change.
Use Monitor answer quality, Capture customer feedback and Track resolution and escalation for measurement definitions and denominator rules. Their Datadog worked queries need mapping to Langfuse; they are not automatic exports into this destination.
All requests succeed but CX gets worse
Separate transport health from customer outcomes.
An HTTP success can contain an unhelpful answer, a failed business result or an escalation. Pair request health with independently measured resolution, answer-quality and feedback records. Report unknown/not-assessed coverage rather than treating it as success.
Maintaining export
Keep telemetry reliable through releases and credential changes.
Telemetry can be delayed or lost. A quiet dashboard alone does not distinguish low traffic from a delivery failure.
Studio
Assign the maintenance owners
Ask the developer who owns your Chat backend to monitor export health, and the Langfuse administrator to own destination access and retention. Confirm who investigates missing traces and where your team reports a problem.
Verify delivery after changes
After a deployment change, run an approved staging conversation through your interface. Ask the developer for its matching voiceflow.chat.turn link. Check the intended project and environment, request status and conversation mapping. A connection check alone does not prove that real Chat turns are being recorded.
Coordinate credential changes
Have the provider administrator and backend developer rotate the destination credential together. Obtain a successful connection check and a real staging-turn trace from the updated backend before the administrator retires the old credential. Review who can access the collected data and how long it is retained.
Disable this destination
Coordinate removal and verify the customer experience.
Ask the developer to stop exporting to Langfuse while preserving the original Voiceflow request and session handling. Verify a staging conversation still works, then have the administrator revoke unused destination access. Existing records remain subject to the destination’s retention policy.
Code
Operate the exporter
Keep one Monitor per backend process and call monitor.close() on graceful shutdown. Batching avoids an intake request on every customer response, but it is not a durable queue. Monitor exporter errors, rate limits and shutdown loss. Add a reliable background/export pipeline if your workload needs delivery guarantees.
Each connection check and Chat turn starts an independent root span. The provider explicitly uses ALWAYS_ON, so an existing parent span or OTEL_TRACES_SAMPLER setting cannot suppress it. This records every wrapped request; delivery failures can still lose records. If you change sampling, account for the resulting population in comparisons.
Review destination access and retention. Keep opaque IDs out of high-cardinality metric grouping and never attach credentials or unreviewed conversation text as attributes.
Rotate and verify
Rotate the destination credential in the host secret store, restart or redeploy the exporter, then repeat the connection check and one real staging turn. Retire the old credential after confirming the new one reaches the intended destination. Use API keys and endpoint from the same project/region. A display name is not an authorization or routing key. Direct OTLP observation attributes must accompany each exported span when you later add child spans.
Disable this destination
Remove export without changing the customer conversation.
Remove the Langfuse exporter or wrapper from the backend while retaining its original Voiceflow request, session mapping and error handling. Revoke the unused destination key and remove server secrets. Existing data remains subject to the destination’s retention policy. Do not delete a shared project or change unrelated OTel exporters as part of disconnecting this recipe.
Cross-system investigations also need a mapping to your application’s tool results. These request traces do not expose tools running inside Voiceflow. Follow Investigate cross-system failures for the correlation rules.