How to publish agent observability data to externa...
# ask-ai
n
How to publish agent observability data to external dashboard?
t
Thanks for reaching out, Tareq. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
You're asking how to publish agent observability data to an external dashboard — do you want to export logs, traces, metrics/usage, or whole session data (recordings/transcripts)? Also tell me which external dashboard or backend you plan to use (Datadog, CloudWatch, Sentry, New Relic, an OTLP/OTEL collector, or a custom endpoint). With those two details I’ll give the exact steps and code/config snippets you need. Sources: Agent insights in LiveKit Cloud | LiveKit docs | Log collection | LiveKit Docs | Observability data hooks | LiveKit docs | LiveKit Pricing
n
I want whole session data. I use datadog
t
You're asking how to publish whole session observability data (audio recordings, transcripts, traces, logs) to Datadog. Here's what you can do and the exact steps/options. Short summary • Runtime logs: LiveKit can forward logs to Datadog. Set
DATADOG_TOKEN
(and optionally
DATADOG_REGION
) as secrets via the LiveKit CLI to enable automatic log forwarding. • Traces: Export traces using OpenTelemetry/OTLP from the Agents SDK to a Datadog-compatible OTLP endpoint. • Recordings & transcripts (whole session assets): LiveKit Cloud lets you download a zip of session data from the Agent insights tab per session. Automatic export of full session assets to your own cloud storage is coming soon, so for Datadog you’ll need a custom flow to push recordings/transcripts into Datadog (e.g., store in object storage then send metadata/links or push relevant artifacts to Datadog as logs or APM events). Steps — enable log forwarding to Datadog 1. Add Datadog secret: ◦ Use the LiveKit CLI to add
DATADOG_TOKEN
(and optionally
DATADOG_REGION
) as secrets for your deployment. 1. Confirm logs appear in Datadog: ◦ Logs from agents will be forwarded automatically after the secret is set. Verify in Datadog Logs. Steps — send traces via OpenTelemetry to Datadog 1. Configure OTLP exporter environment variables for your agent process: ◦ Set
OTEL_EXPORTER_OTLP_ENDPOINT
to your Datadog OTLP endpoint. ◦ Set
OTEL_EXPORTER_OTLP_HEADERS
with Datadog API key header (Datadog expects
DD-API-KEY:<key>
or the header required by your Datadog ingestion method). 1. Initialize tracing in your agent code with a
TracerProvider
and add an OTLPSpanExporter and
BatchSpanProcessor
. 2. Start sending spans; verify in Datadog APM/Traces. Options for full session data (recordings + transcripts) • Manual download per session: ◦ In LiveKit Cloud: open the session in Agent insights and click "Download data" to get the zip containing audio, transcripts, traces, and logs. Upload those artifacts into Datadog as needed (e.g., store in S3 and send links/metadata to Datadog logs or create Datadog events). • Automated/custom pipeline (recommended for production): ◦ When a session ends, have your agent/service: i. Programmatically collect session artifacts (if available via your setup) or call the LiveKit Cloud session export if you have access to automate downloads. ii. Upload binary artifacts (audio, transcript files) to an object store (S3/GCS). iii. Send a Datadog log or event containing metadata and signed URLs to the stored artifacts, or push extracted text/transcript content as log entries. ◦ Alternatively, push transcripts and relevant metadata directly to Datadog Logs or create custom APM spans/Events linking to artifacts. • Using traces + logs together: ◦ Keep traces in Datadog via OTLP and runtime logs via
DATADOG_TOKEN
. Use logs/events to reference the storage locations of large artifacts (audio files), and include transcript text in logs if you want searchable text in Datadog. Limitations to note • There is no built-in automatic export that sends the full session zip directly to Datadog. Use the manual download or build the custom pipeline above. • Datadog is suitable for logs/traces and metadata; large binary assets are better stored in object storage with references sent to Datadog. Would you like: • the exact CLI command to add
DATADOG_TOKEN
as a secret for your deployment, or • a code example for configuring OTLP tracing from the Agents SDK to Datadog, or • a sample serverless pipeline (webhook + S3 + Datadog log) to upload session zips and push metadata into Datadog? Tell me which one and I’ll provide the specific commands/snippets.