Users
Tracking user info in your traces for observability
You can track user interactions with your LLM app by setting the user ID in a trace. This allows you to track things such as how much tokens each user is costing you, who interacted with your LLM app the most, etc.
You can use update_current_trace to set the user_id within traces:
The user_id can be any string, including the actual IDs of customers in your own database, or even their email addresses. Everything will be viewable and searched in the UI.