session_id to group traces together — all turns in a conversation, or all steps in a multi-agent workflow.

Using context manager
Useusing_attributes to propagate session_id to all traces within a block:
user_id to get full context on every trace:
Using decorator / inside a function
Callupdate_current_trace from within any observed function: