What Are Sessions?
Sessions in Laminar provide a way to group related traces together. This is particularly useful for:- Grouping traces from a single user interaction
- Connecting multiple API requests that form a logical sequence
- Organizing conversational turns in a chatbot
- Tracking complex workflows across multiple functions or services
Creating Sessions
You can associate a trace with a session using the following methods:- JavaScript/TypeScript
- Python
Use the
Laminar.setTraceSessionId
function inside a span context:Alternative: Setting Session ID with Observe
You can also set the session ID directly when using theobserve
decorator/wrapper:
- JavaScript/TypeScript
- Python
Viewing Sessions
To view sessions in the Laminar UI:- Navigate to the Traces page
- Select the “Sessions” tab
- Click on a session to expand it and see all traces within that session