Overview
LiveKit Tracing provides deep observability into your LiveKit agent’s performance by integrating the Cekura Python SDK directly into your LiveKit agent code. This integration captures detailed metrics, conversation transcripts, tool calls, and session data that enhance the information available in the Cekura platform. When you enable tracing and integrate the SDK, Cekura receives comprehensive data about each test run, including:- Complete conversation transcripts with full message history
- Tool/function calls with inputs and outputs
- Detailed performance metrics (STT, TTS, LLM, End-of-Utterance)
- LiveKit room and session IDs
- Job and room metadata
Prerequisites
- A Cekura account with an API key
- A LiveKit agent project
Setup
Integrate the SDK in your LiveKit agent
Add the Cekura tracer to your LiveKit agent’s entrypoint. Here’s a complete example:Key integration points:
- Initialize the tracer: Create a
LiveKitTracerinstance with your API key and agent ID - Start session tracking: Call
start_session()after creating yourAgentSession - Add shutdown callback: Register
cekura.export()to send data when the session ends
Add environment variables to LiveKit
Add the following environment variables to your LiveKit agent:
CEKURA_API_KEY: Your Cekura API key from Settings → API KeysCEKURA_TRACING_ENABLED(Optional): Set to"true"(default) or"false"to disable tracing

Configure LiveKit provider and enable tracing
Navigate to your agent settings in the Cekura dashboard, select LiveKit as the provider, and enable tracing:
Required configuration:

- Provider: Select “LiveKit” from the dropdown
- Enable Tracing: Toggle this ON to receive enhanced data from the SDK
- Contact Number: Provide the phone number associated with your LiveKit agent
- Use this if your LiveKit agent is connected to a phone system and you want to test via phone calls
- LiveKit API Key: Your LiveKit API key
- LiveKit API Secret: Your LiveKit API secret
- LiveKit URL: Your LiveKit server URL (e.g.,
wss://your-server.livekit.cloud) - Agent Name: The specific agent name to dispatch in LiveKit
- LiveKit Config (JSON) (Optional): Additional room configuration parameters
You must provide at least one of the options above. Your choice determines which testing method you can use later (you can configure both to enable both testing methods).
Run tests with tracing
Once tracing is enabled and the SDK is integrated, run tests based on your configuration:
- If you configured Option 1 (Phone Number): Use “Run with Voice”
- If you configured Option 2 (LiveKit Credentials): Use “Run with LiveKit”

Enhanced Data in Cekura UI
With tracing enabled, you’ll see enriched information in the Cekura platform: The run now displays:- Room Session ID: Visible in the call provider ID field, allowing you to correlate Cekura test runs with specific LiveKit sessions
- Complete Transcript: Full conversation history from the LiveKit agent, including tool/function call requests and responses
- Provider Call Data: Detailed metadata accessible in the run details, including job information, room configuration, and raw performance metrics

- Job ID
- Room name
- Participant details
- Agent dispatch metadata
- Custom metadata passed to the session
- Room configuration
- Participant count
- Session duration
- Connection details
- STT (Speech-to-Text): Latency, duration, and transcription timing
- TTS (Text-to-Speech): Generation time and audio synthesis metrics
- LLM: Token usage, response time, and inference latency
- EOU (End-of-Utterance): Detection timing and accuracy
Configuration Options
SDK Parameters
Configure theLiveKitTracer with these parameters:
Best Practices
-
Disable tracing in production: Use
CEKURA_TRACING_ENABLED="false"in your production environment. This feature is designed for simulation testing only. Observability integration for production calls is coming soon. - Always register the shutdown callback: This ensures data is exported even if the session ends unexpectedly
- Use environment variables for credentials: Don’t hardcode API keys in your code
-
Keep the SDK updated: Run
pip install --upgrade cekuraperiodically for the latest features - Review tool calls regularly: Add the predefined metric Tool Call Success to your evaluators
Next Steps
- Create custom metrics to evaluate based on provider call data
- Perform load testing with your LiveKit agent
- Explore predefined metrics