glamorous-church-16794
12/22/2025, 5:20 PMrequest-id/trace-id asking because we are tyring to see if we can use the same Id to debug across our systems, also not sure I saw search option in the logs, would be nice to search the logs as well?
Thankstall-airline-16756
12/22/2025, 5:20 PMtall-airline-16756
12/22/2025, 5:20 PMrequest-id / trace-id in the job dispatch metadata and surface them in agent logs by writing them into custom log fields (for example, set ctx.log_context_fields in your agent entrypoint). That lets your IDs appear in the agent logs so you can correlate across systems.
Log search and filtering
• The Cloud dashboard supports log search and filtering in Agent Insights and session pages (time-range filters, severity levels, and URL-shareable filters). Logs show traces, transcripts, and key events (tool calls, handoffs), which should help debugging with your correlated IDs.
If you’d like, I can:
• Show an example dispatch payload and the exact metadata keys to use for `request_id`/`trace_id`.
• Walk through a short test to confirm your IDs appear in the dashboard logs.
Which would you prefer?
Sources: LiveKit Cloud billing | LiveKit docs | LiveKit Pricing | https://blog.livekit.io/streamline-troubleshooting-with-agent-observability/#/portal/signup| | Job lifecycle | LiveKit docs | Streamline Troubleshooting with Agent Observabilityglamorous-church-16794
12/22/2025, 5:22 PMtall-airline-16756
12/22/2025, 5:22 PMrequest_id / trace_id in job metadata, plus how to surface them in the agent’s logs.
1) Example dispatch (JSON) — include custom IDs in `job.metadata`:
{
"type": "dispatch_job",
"job": {
"task": "voice_agent",
"metadata": "{\"request_id\":\"req-12345\",\"trace_id\":\"trace-abcde\",\"user_id\":\"user-42\"}",
"room": "room-001"
}
}
2) Agent entrypoint — Python example that extracts metadata and sets ctx.log_context_fields so IDs appear in LiveKit logs:
import json
from livekit_agent import JobContext, server
@server.rtc_session()
async def my_agent(ctx: JobContext):
# Parse metadata JSON string
try:
metadata = json.loads(ctx.job.metadata or "{}")
except Exception:
metadata = {}
# Add your custom IDs to log context fields
ctx.log_context_fields = {
"request_id": metadata.get("request_id"),
"trace_id": metadata.get("trace_id"),
"user_id": metadata.get("user_id"),
"room_name": ctx.room.name
}
<http://ctx.log.info|ctx.log.info>("Agent started for request", extra=ctx.log_context_fields)
# ... rest of agent logic ...
3) Agent entrypoint — Node/TypeScript example (same idea: parse metadata, attach to logs):
import { server } from "livekit-agent";
server.rtcSession(async (ctx) => {
const metadataStr = ctx.job.metadata ?? "{}";
let metadata: Record<string,string> = {};
try {
metadata = JSON.parse(metadataStr);
} catch (e) {}
// Attach custom fields for logging
ctx.logContextFields = {
request_id: metadata.request_id,
trace_id: metadata.trace_id,
user_id: metadata.user_id,
room_name: ctx.room.name,
};
<http://ctx.log.info|ctx.log.info>("Agent started for request", ctx.logContextFields);
// ... rest of agent logic ...
});
Notes
• Use consistent keys (request_id, trace_id) in your dispatcher and backend so correlation works end-to-end.
• These fields will show up in the agent logs in the dashboard, letting you search/filter by them.
Want me to generate a sample dispatch call in the language you use (curl, Python, or JS) to test end-to-end?glamorous-church-16794
12/22/2025, 6:06 PMtall-airline-16756
12/22/2025, 6:06 PMaudio_only=true) — exports a single mixed audio file for the room.
b. Track Egress — exports individual participant tracks (stored as OGG) or stream raw PCM (pcm_s16le) to a WebSocket.
Supported output destinations include S3, Google Cloud Storage, Azure, and others.
Would you like a sample egress request (curl, Python, or TypeScript) for the export flow you plan to use?
Sources: https://blog.livekit.io/streamline-troubleshooting-with-agent-observability/#/portal/signup| | RoomComposite Egress | LiveKit Docs | Universal Egress | Track egress | LiveKit docs | Egress output types | LiveKit docsglamorous-church-16794
12/22/2025, 6:08 PMtall-airline-16756
12/22/2025, 6:09 PMallow_interruptions, turn detection method, endpointing delays) and dynamic changes (updated prompts, tool lists, runtime overrides).
• Custom metadata: include `request_id`/`trace_id` via job metadata and surface them in logs using ctx.log_context_fields (Python) or ctx.logContextFields (TS).
What’s in the pipeline (coming enhancements)
• Cross‑session / aggregate metrics and dashboards (latency trends, interruption rates, outlier detection).
• Automated testing and simulation tooling to validate prompts/models/tools before production.
• Improved EOU using multimodal features (raw audio/prosody) to reduce interruptions and improve accuracy.
• Automated export integrations and regional/localized data storage.
If you want, I can:
• Provide sample queries/filters to find sessions by `request_id`/`trace_id`.
• Share an example aggregate metric you’d find useful (e.g., avg LLM latency per day) so I can show how it would appear once available.
Which follow-up would help you most?
Sources: https://blog.livekit.io/streamline-troubleshooting-with-agent-observability/#/portal/signup| | https://blog.livekit.io/streamline-troubleshooting-with-agent-observability/#/portal| | Streamline Troubleshooting with Agent Observability | Agents (Python) | livekit/livekit_composite | DeepWiki | examples/drive-thru | livekit/livekit_composite | DeepWikiglamorous-church-16794
12/22/2025, 7:45 PMtall-airline-16756
12/22/2025, 7:46 PMjob.metadata (e.g., request_id, trace_id).
4) Surface IDs in agent logs
• In your agent entrypoint set log context fields so IDs appear in dashboard logs:
◦ Python: set ctx.log_context_fields = { "request_id": ..., "trace_id": ... }
◦ TypeScript: set ctx.logContextFields = { request_id: ..., trace_id: ... }
5) Control recording (optional)
• Project-level: enable/disable recordings in Data & privacy.
• Agent-level: override with record=False in agent code to prevent session recording.
6) Inspect sessions in dashboard
• Open a session → Agent insights tab to view transcripts (audio‑synced), traces (LLM/STT/TTS/tool spans), and logs. Use search/filters and share filter URLs.
7) Export data
• Download audio, transcripts, and logs directly from the session. For automated exports, use Room Composite or Track Egress (S3/GCS/Azure destinations).
8) Know retention & billing
• Observability data is stored in the US and retained 30 days. Usage is metered (events and recorded minutes) and counted toward your cloud billing.
If you want, I can generate:
• A sample dispatch call (curl/Python/JS) including `request_id`/`trace_id`, or
• A ready-to-run agent snippet you can drop into your codebase. Which would you prefer? Sources: https://blog.livekit.io/streamline-troubleshooting-with-agent-observability/#/portal| | Streamline Troubleshooting with Agent Observability | https://blog.livekit.io/streamline-troubleshooting-with-agent-observability/#/portal/signup|glamorous-church-16794
12/22/2025, 10:19 PMtall-airline-16756
12/22/2025, 10:20 PMrequest_id or trace_id (exact match) to locate related log entries.
4. Use the time-range selector or the timeline playhead to narrow results; enable “Sync with playback” to jump to that moment.
5. Use level filters (DEBUG/INFO/WARN/ERROR) to reduce noise.
If the magnifying-glass is not opening for you, can you tell me:
• Browser + version you’re using, and
• Whether you’re on a team/project where Agent Observability is enabled?
I’ll help troubleshoot further.glamorous-church-16794
12/22/2025, 10:25 PMtall-airline-16756
12/22/2025, 10:25 PMrecord=False (this prevents logs/transcripts from being captured)?
4. Which LiveKit plan are you on (Build/Scale/Ship)?
5. Can you paste a short screenshot or confirm whether the Logs tab shows at all and only lacks the search box?
If you prefer, I can also walk you through a quick repro: tell me the browser and I’ll give exact steps to reproduce and a workaround (e.g., search via exported logs or use timeline + “Sync with playback”) while we investigate. Which do you want to try?
Sources: https://blog.livekit.io/streamline-troubleshooting-with-agent-observability/#/portal/signup| | LiveKit Pricingglamorous-church-16794
12/22/2025, 10:26 PMtall-airline-16756
12/22/2025, 10:27 PMglamorous-church-16794
12/22/2025, 10:28 PMtall-airline-16756
12/22/2025, 10:28 PMglamorous-church-16794
12/22/2025, 10:29 PMtall-airline-16756
12/22/2025, 10:29 PMjob.metadata and surfacing them via ctx.log_context_fields (Python) or ctx.logContextFields (TS); those fields appear in logs and make locating relevant entries faster in the UI.
• Export session logs (download) or use egress to send logs/audio to your storage (S3/GCS/Azure) and run full‑text search in your own tooling.
Planned: richer log-search and cross‑session/aggregate search are on the roadmap.
Next step (recommended): I can send exact steps to export the session logs now (or a sample dispatch + agent snippet to add `request_id`/`trace_id`). Which would you prefer?glamorous-church-16794
12/22/2025, 10:31 PMtall-airline-16756
12/22/2025, 10:31 PMjob.metadata and surface them in logs via ctx.log_context_fields (Python) or ctx.logContextFields (TS).
What I can do right now to help
• Walk you through exporting the session logs so you can run full‑text search locally (step‑by‑step).
• Send a ready-to-run dispatch + agent snippet that adds `request_id`/`trace_id` if you want to test correlation.
• Troubleshoot the Arc rendering if any controls are unresponsive.
Which one would you like me to do first?glamorous-church-16794
12/22/2025, 10:32 PMtall-airline-16756
12/22/2025, 10:32 PMglamorous-church-16794
12/22/2025, 10:34 PM