Build with

Overview

Voiceflow integrates with Datadog so you can track customer conversations alongside the rest of your application. Send conversation and call events to Datadog Logs, correlate them with Voiceflow transcripts, and trace requests from your own Chat backend.

Monitoring model behavior? These recipes collect lifecycle events and application request traces. Internal prompts, model/tool spans, token usage, cost and evaluations are not included. Use Voiceflow’s Transcripts and Evaluations to investigate conversation content and quality.

To add CX measurement beyond lifecycle logs, follow Track resolution and escalation and the other shared monitoring guides. They explain the additional evidence and export mapping your team supplies.

Connecting Datadog

Prepare the receiving service and authorize Datadog intake.

Before you begin

You need a Voiceflow project, a Datadog organization with Log Management, and a developer who can deploy an HTTPS webhook receiver. For request tracing, also enable Datadog Agent Observability and have access to the server behind your custom Chat interface.

Use the Datadog site your organization belongs to, such as datadoghq.com or datadoghq.eu. The starter selects that site’s intake automatically. Keep both secrets on the server.

Studio

1

Ask your developer to prepare the receiver

Give your developer the Datadog starter and this project’s ID. Ask them to deploy its /voiceflow/events route behind HTTPS, configure the Datadog key/site, and return the exact endpoint URL. They will add the webhook secret after you save the endpoint.

If this project already has a webhook receiver, have the developer add Datadog forwarding there. Replacing its URL can interrupt another workflow.

2

Set the project webhook URL

Open the project in Agent studio, then Settings → Webhooks. Under Session lifecycle webhook, enter the developer’s URL in Webhook url, then click outside the field and wait for Saved.

Replace the example URL with your receiver's HTTPS endpoint. Photo:
3

Select events and finish verification setup

Choose Listen for specific events, then Session started and Session ended. Add Call started and Call ended for voice. Wait for Saved. If your workspace shows no event selector, the receiver still filters incoming deliveries to these four events.

Copy Webhook secret to the developer through your team’s secret-sharing process. Ask them to confirm signature verification is active and a signed test delivery reaches Datadog. A saved URL alone does not complete the connection.

Code

1

Install the receiver

Download and extract the Datadog starter. From its datadog directory, use Node.js 22 or later:

The archive includes the receiver, Datadog client, Chat instrumentation and fixture tests. Tests do not send data to either service.

2

Configure server secrets and HTTPS

Set DD_SITE, DD_API_KEY and VF_PROJECT_ID in your host’s secret manager. Set DD_SERVICE=voiceflow-agent and DD_ENV=staging for the first test. These label the exported service; DD_ENV does not select a Voiceflow Environment.

The receiver listens on loopback port 3000 by default. Expose /voiceflow/events through your HTTPS proxy, preserve the raw body and svix-* headers, and apply ingress rate limits. Its body limit is 64 KiB. Do not point Voiceflow directly at Datadog’s intake: the receiver verifies signatures and translates the event.

3

Register the project endpoint

Open your project at creator.voiceflow.com, then Settings → Webhooks → Session lifecycle webhook. Enter the receiver’s HTTPS URL in Webhook url and wait for Saved. With Listen for specific events, select Session started, Session ended, and the two call events if needed. Wait for the event selection’s Saved confirmation too.

Register the project receiver before testing signed delivery. Photo:

Copy Webhook secret from this endpoint into VF_WEBHOOK_SECRET, then start the receiver with npm start. If another integration already owns this project’s URL, extend its receiver instead of replacing it. Complete the conversation test before release.

Datadog receives no logs

Check each boundary from Voiceflow delivery to indexing.

Check the receiver’s HTTPS route, selected events and signature verification. A 401 from the starter means the raw body, signing headers or endpoint secret did not verify. A 503 means forwarding failed: inspect the Datadog site/key and intake health.

Datadog returns 202 when it accepts a log for processing. If the receiver succeeds but search is empty, check the search time range, selected organization, pipelines and index exclusions. The Live Tail can help separate ingestion from indexing.

Tracking conversations and calls

Find a conversation’s lifecycle and compare elapsed times.

The starter exports metadata without copying message text, phone numbers or customer IDs. It preserves session_id and transcript_id when supplied, so your team can find the matching Voiceflow conversation. Treat these IDs as sensitive operational data and apply your retention and access policy.

Closing the widget does not immediately end its session. Calls and sessions are not one-to-one; use call events for call duration. Neither duration measures response latency. See the lifecycle reference for exact event behavior.

Studio

1

Run a real channel conversation

Use your published widget or another deployed channel. Ask a sandbox support question, then follow a path that ends the conversation or let its idle timeout expire. For voice, make a short test call and hang up.

2

Find the same conversation in Datadog

In Logs → Explorer, search service:voiceflow-agent env:staging. Inspect a start and end event for the same session_id, then find the matching record in Voiceflow’s Transcripts. For voice, check the call’s timing separately.

Ask your developer to confirm delivery if an event is missing, and to test an invalid signature. It must be rejected without creating a log.

Code

1

Exercise the actual session lifecycle

Start a conversation through the widget, voice connection, or current Chat session API. Launch once and send a sandbox question. Do not use the legacy Interact endpoints for this check; they do not create the sessions these events describe.

2

Inspect the exported record

Search service:voiceflow-agent env:staging in Datadog Logs. The receiver translates a signed session-end delivery into this shape; values below are illustrative:

Confirm the original event_time_ms, available Environment fields and conversation IDs. version_id comes from the event’s environmentID; the named Voiceflow Environment is environment_id/environment_alias when present. Missing optional fields stay absent.

3

Check delivery failure and recovery

In a sandbox, reject a signed request after changing its body; expect 401 and no log. Make Datadog forwarding fail; expect 503, then restore it and replay the delivery through your webhook delivery tooling. Confirm the same event_id reaches Datadog. A retry can create a duplicate if the earlier intake succeeded before its acknowledgment was lost.

Counts or timestamps look wrong

Account for retries, idle sessions and delayed delivery.

For event counts, use the unique count of @event_id, rather than raw log count. A call can reuse an existing conversation session, and optional session IDs can be absent; do not invent a join key when none was delivered.

Datadog dates these logs by receipt time. The original event_time_ms remains available for investigation, so delayed delivery does not silently look like a new customer conversation. Use native Analytics for Voiceflow’s product-level reporting.

Tracing Chat requests

Measure the request boundary in your own Chat backend.

Use this path when your team owns a custom Chat interface. The starter wraps non-streaming /v4/interact calls and submits a workflow span to Datadog Agent Observability. Each turn is a root span; an opaque application conversation ID groups its turns into a Datadog session.

The duration covers your server’s outbound request and JSON response read. It excludes browser rendering and Voice streaming, and does not reveal internal model or tool spans. HTTP success also does not prove that the customer’s task succeeded.

Studio

1

Confirm which interface you deploy

If you use Voiceflow’s widget or a phone channel, continue with lifecycle logs. This instrumentation belongs in a backend your team controls; there is no tracing switch to turn on in the widget.

2

Give your developer the tracing task

Ask the developer maintaining your custom Chat backend to use observeChatTurn and sendSpans from the starter. Give them your Datadog service/site labels and an approved test conversation. They should retain the existing session and customer access checks, and use an opaque conversation ID rather than a credential or customer contact detail.

3

Review the result together

Ask a sandbox question through that interface. In Datadog Agent Observability, find voiceflow.chat.turn under voiceflow-agent; check its session grouping and duration. Have the developer test a failed request too. Confirm the customer still receives the application’s normal response or error when Datadog is unavailable.

Code

1

Keep your existing Chat session setup

Your backend creates the session, keeps its returned sessionKey in server-side conversation state and authorizes the customer’s access. Launch once; reuse that key for later actions. Create a separate random application conversation ID for telemetry and retain that mapping on your server. Do not export the session key.

2

Wrap the non-streaming action

Import the starter into the backend that already sends Chat actions:

Instrument the existing Chat handler

For a network/JSON-read failure, observeChatTurn throws an error with error.span. Attempt to submit that span in your handler’s error path, then preserve the application’s existing recovery behavior. Do not automatically repeat the customer action after an ambiguous failure.

3

Verify success and failure before release

Send launch, then a text action using the same session. Find their voiceflow.chat.turn spans in Datadog and check that session_id matches your opaque application ID. A 202 intake response acknowledges submission; inspect the resulting trace too.

Test a non-2xx runtime response, a network failure and unavailable Datadog intake. Preserve the real HTTP status/body for the client and omit prompts, answers and credentials from telemetry. The included fixture tests exercise these boundaries locally.

Trace delivery slows the response

Move telemetry off the customer path with a reliable background task.

The short example awaits intake, adding up to the client’s five-second telemetry timeout. In your application, hand the span to a durable queue or your host’s awaited background-task facility, then respond to the customer. A detached promise may be terminated when a serverless request ends.

Monitor that queue or task separately. Retrying telemetry must not replay the Voiceflow action. Check Datadog’s site availability and span intake rules before sending delayed spans; the API accepts timestamps no more than 24 hours old.

Creating dashboards and alerts

Turn collected signals into useful operational checks.

Start with the questions your support team needs to answer. Keep conversation lifetime, call duration and Chat request latency separate.

Build a conversation dashboard

In Logs → Explorer, filter to service:voiceflow-agent env:staging @event_type:runtime.session.end. Choose a timeseries with the unique count of event_id, then use Export to Dashboard to add the graph to your team’s dashboard. Compare the plotted period with your test conversation. Add a separate call-duration graph rather than mixing its values with session lifetime.

Create the first log monitor

1

Choose the signal

In Datadog, open Monitors → New Monitor → Logs. Use service:voiceflow-agent env:staging @event_type:runtime.call.end and select duration_ms as a measure. Check that the query finds your test call.

2

Set the condition and destination

Choose the duration aggregation, threshold and time window that match your call experience. Add your team’s notification destination, then save the monitor.

3

Verify the alert and recovery

Only indexed Standard Tier logs participate in log monitors. Confirm the query finds your test records before relying on the alert. Trigger a controlled sandbox condition and verify both the alert and recovery notification.

Maintain the connection

Assign owners for the receiver, Datadog key, webhook signing secret and alert routing. During key rotation, update the server-held value and repeat a real conversation test before retiring the old key. For Voiceflow’s signing secret, follow secret rotation; the old signature secret remains valid for 24 hours.

Disable export without disrupting the agent

Remove forwarding while preserving other webhook consumers.

Disable the Datadog destination in your shared receiver, or clear this project’s webhook URL only if no other workflow uses it. Remove the custom Chat instrumentation without changing its runtime call or session handling. Then revoke the unused Datadog key and remove the server secrets.

Previously ingested data follows Datadog’s retention policy. Disabling forwarding does not delete it or Voiceflow’s transcripts.

Use the up and down arrow keys to select a result, Enter to open it, and Escape to close the search.