Session Continuity
Cloudflare Durable Objects can hibernate. Because an object can sleep between messages, Liminal does not model a WebSocket connection as one long live span.
Long-running spans are difficult to end reliably and can produce oversized traces.
Persisted session metadata
Instead, Liminal persists session metadata in the WebSocket attachment:
{
attachments: unknown
sessionId: string
trace: {
traceId: string
spanId: string
sampled: boolean
}
}After hibernation, the Durable Object hydrates that metadata and links the registration work back to the stored session trace.
Short spans still represent the actual work: message receive, handler execution, event send, close, error, and hydration. The session id is attached to actor-side spans when a socket is known. Handler, event-send, on-connect, and hydration paths also link back to the stored session trace.
Useful attributes and links
Look for these attributes and links in your telemetry backend:
liminal.session.id: stable per connected socket sessionliminal.link = session: link from handler, event-send, on-connect, and hydration spans back to the session traceliminal.link = transport: link from handler spans back to the local message-receive spanliminal.transport = websocketorworker