Live Logs
Watch trace events arrive in real time.
Overview
The Live Logs view displays a real-time stream of trace events as they arrive from the TraceLLM WebSocket. Every time a trace is created, updated, or persisted, a trace.created event is broadcast to all connected clients — including this view, the CLI monitor, and any other WebSocket subscribers.
WebSocket Connection
The live logs connect to the backend WebSocket at ws://127.0.0.1:8000/ws. On connection, the server sends a system.connected message. Clients can send {"type": "ping"} messages to which the server responds with {"type": "system.pong"}.
// Server → Client (on connect)
{
"type": "system.connected",
"status": "connected",
"message": "TraceLLM websocket active"
}
// Server → Client (on trace creation)
{
"type": "trace.created",
"trace": { ... } // Full TraceSchema object
}
// Client → Server (heartbeat)
{ "type": "ping", "ts": 1717151234 }
// Server → Client (heartbeat response)
{ "type": "system.pong", "timestamp": 1717151234 }Log Entries
Each incoming trace event is displayed as a log entry showing:
- Timestamp of receipt
- Trace ID
- Status badge (success/warning/failed)
- Model name
- Latency and token count
- Prompt preview (first 80 characters)
Tip
Auto-Reconnect
The WebSocket client implements automatic reconnection with exponential backoff from 1 to 30 seconds. If the backend restarts or the network drops, the dashboard automatically reconnects once the service is available again.
Warning