Sessions
A session is an optional grouping of related traces into a multi-turn conversation. Traces always exist; sessions only exist when your application sends a session id with telemetry.
How sessions work
All traces with the same session id are grouped together chronologically. A session might look like:- Trace 1: User asks about an order status
- Trace 2: User asks a follow-up question
- Trace 3: User asks to change the order
Send a session id
Pass a session id throughcapture() at the request, conversation turn, or agent entrypoint.
- TypeScript
- Python
Viewing sessions
Switch between Sessions and Traces with the tab toggle at the top of the Traces page. Sessions is the default view. The sessions view shows one row per session, with columns for:- session name (the root span’s name, falling back to the session id)
- last activity
- tags
- duration (active execution time)
- time to first token
- cost
- session id
- user id, when provided
- models used
- span count
- error and annotation indicators
Sessions in search and review
Sessions are an aggregation on top of traces. Search, annotations, scores, and issues still operate primarily on traces. You can:- filter traces by session id
- search within a specific session
- open traces from a session and annotate them
- use session context to understand failures that unfold across turns
Related
- Traces: The individual interactions that make up a session
- User tracking: Associate traces and sessions with users
- Search: Find traces within session-scoped cohorts
- Scores: How scores attach to traces