Sessions & users
Stitch multi-turn conversations into one timeline and slice every metric by end user with session and user ids.
One conversation is many traces. Pass a session id to stitch every turn into a single thread, and a user id to slice your data by the people actually using your product. Add tags to filter by feature, environment, or experiment.
Group by session and user
Set sessionId / userId (and optionally tags) when you create the trace:
What this gives you
- Sessions — every trace sharing a
sessionIdis grouped into one replayable conversation timeline, with its own rolled-up trace count and cost. - Users — filter every metric (cost, latency, volume) by
userId, and spot your heaviest users and most expensive conversations. - Tags — label traces by environment, feature, or experiment for fast filtering.
Choosing ids
- Use a stable
userId— your app's user identifier, not a per-request value — so a user's traces aggregate over time. - Use one
sessionIdper conversation or thread; reuse it across every turn that belongs together.
Next: send data with OpenTelemetry.
currai