Events
SSE Streaming
(Archived) Legacy Lens runtime: real-time SSE streaming of lens session output.
Was this page helpful?
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
(Archived) Legacy Lens runtime: real-time SSE streaming of lens session output.
| Feature | Behavior |
|---|---|
| Reader Tracking | Each reader gets unique reader_id for independent position tracking |
| Heartbeats | Sent every 5 seconds when no data available |
| Auto-Timeout | Stream closes automatically after extended inactivity |
| Session TTL | Default 10 minutes (600 seconds) |
| Event Format | Standard SSE: data: {json}\n\n |
{
"type": "sse.stream.start",
"event_data": {
"session_id": "lsn-abc123",
"reader_id": "reader_xyz"
}
}
{
"type": "sse.stream.heartbeat",
"event_data": {
"session_id": "lsn-abc123",
"session_status": "SESSION_STATUS_RUNNING",
"num_messages": 42,
"num_bytes": 15234,
"message_timeout": 2.5,
"reader_id": "reader_xyz"
}
}
{
"type": "sse.stream.end",
"event_data": {
"session_id": "lsn-abc123",
"session_status": "SESSION_STATUS_RUNNING",
"num_messages": 100,
"num_bytes": 45678,
"message_timeout": 58.2,
"reader_id": "reader_xyz"
}
}
{
"type": "sse.stream.end",
"event_data": {
"session_id": "lsn-abc123",
"reader_id": "reader_xyz",
"session_status": "SESSION_STATUS_KILLED",
"warning": "Session status is : SESSION_STATUS_KILLED"
}
}
| Metric | Description |
|---|---|
num_messages | Total messages sent to this reader |
num_bytes | Total bytes transmitted |
num_errors | Transmission errors encountered |
stream_send_delay_sec | 95th percentile send latency |
sse_start_time | Stream start timestamp |
sse_end_time | Stream end timestamp |
sse_run_time | Total stream duration |
Was this page helpful?