Each trace you run is usually connected to entities in your own application - things like user_id, chat_id, or anything else that is tied to the flow that triggered the trace.

OpenLLMetry allows you to easily mark traces with these IDs so you can track them in the UI.

You can use any key-value pair to associate a trace with an entity - it can also be org_id, team_id, whatever you want. The only requirement is that the key and the value are strings.

from traceloop.sdk import Traceloop
 
Traceloop.set_association_properties({ "user_id": "user12345", "chat_id": "chat12345" })