Skip to content

Users

User tracking gives you per-user visibility into token usage, costs, trace volume, and evaluation scores. This is useful for billing, abuse detection, quality monitoring, and understanding how different users interact with your application.

Adding a User ID

Set user_id via propagate_attributes() and it will automatically apply to all observations in that context:

from xeroml import observe, propagate_attributes
@observe()
def handle_request(query: str, user_id: str) -> str:
with propagate_attributes(user_id=user_id):
result = run_pipeline(query)
return result

User Dashboard

XeroML provides two views for user-level data:

User List A table of all users who have sent at least one trace. Columns include:

  • Total traces
  • Token usage (input / output / total)
  • Estimated cost
  • Average evaluation score
  • Most recent trace timestamp

Individual User View Click any user to see their complete history: all traces, session timelines, feedback submitted, and aggregated metrics. Accessible at:

https://cloud.xeroml.com/project/{projectId}/users/{userId}

Custom Dashboards

For advanced user analytics, use the XeroML Metrics API to pull per-user aggregates into your own dashboards or data warehouse. You can also export user-level data via the UI export or blob storage export.