user_id on a trace to associate it with a specific user — enabling per-user filtering, cost tracking, and analytics in the dashboard.

Using context manager
Useusing_attributes to propagate user_id to all traces within a block:
Using decorator / inside a function
Callupdate_current_trace from within any observed function: