session_id string that you provide when starting a trace.
When to use a session
- Chat apps —
session_id = conversation_idso all messages in one conversation are grouped - Agents —
session_id = run_idso every step of one agent run shows up together - Workflows —
session_id = workflow_instance_idfor multi-step background jobs
session_id, each trace is standalone.
Example
In the dashboard
The Sessions view lists every conversation with total traces, total tokens, and a time range. Click one to see every trace in order — this is the “session replay” view. Each trace is expandable to reveal its spans, so you can debug multi-turn failures as a single unit.Choosing a session ID
- Must be a string, up to 256 characters
- Stable across the lifetime of the conversation or workflow
- Ideally has no PII — a UUID or hash of the user/conversation is fine
- If you need to look up a session by external identifier, put that identifier in
metadata, not insession_id