Skip to Content
ConceptsData Model & Identity

Data Model & Identity

How Introspection organizes AI activity and ties telemetry to the right user, conversation, and agent.

Hierarchy

Organization └── Project └── System / Service └── Agent └── Conversation └── Response └── Feedback and events
LevelWhat it representsExample
OrganizationTeam or companyAcme Corp
ProjectProduct, environment, or applicationsupport-assistant, staging-agents
System / ServiceRuntime emitting telemetry (from tracing service name)api-server, agent-worker
AgentNamed AI unit handling workAn OpenAI Agent, a Claude session, a workflow component
ConversationMulti-turn interaction from the user’s perspectiveA chat thread, a task session
ResponseOne model output inside a conversationA single assistant message
Feedback / EventsSignals attached to the user experienceThumbs up/down, comments, product events

Conversation Resolution

Introspection resolves conversations in this order:

  1. Explicit conversation ID — if your app sets gen_ai.conversation.id via the SDK, that value is used directly.
  2. Previous response ID — if previous_response_id is set, the response is linked to the conversation that contains that prior response.
  3. History-based matching — if neither is set, Introspection looks at recent activity from the same user and service to find a likely match.
  4. New conversation — if no match is found, a new conversation is created.

If your app already has stable thread or session IDs, set them explicitly for the most reliable resolution.

Identity

Identity is what makes telemetry useful at the product level. It answers:

  • Which user was involved
  • Which conversation it belonged to
  • Which agent produced the response
  • Which feedback belongs to which answer

Types

Identity typeWhen to useSDK method
UserLogged-in or stable usersset_user_id() / withUserId()
AnonymousPre-login, anonymous feedback, trial trafficset_anonymous_id() / withAnonymousId()
ConversationMulti-turn threads with a stable IDset_conversation() / withConversation()
AgentMultiple assistants or workflow components in one appset_agent() / withAgent()

See the JavaScript, Python, or Rust SDK guide for code examples.

Baggage

The SDKs store context in OpenTelemetry baggage so spans, events, and feedback read it automatically within the same execution scope.

Baggage keySet byMeaning
identity.user_idset_user_id() / withUserId()Authenticated user
identity.anonymous_idset_anonymous_id() / withAnonymousId()Anonymous user
gen_ai.conversation.idset_conversation() / withConversation()Conversation
gen_ai.request.previous_response_idset_conversation() / withConversation()Link to a prior response
gen_ai.agent.nameset_agent() / withAgent()Agent name
gen_ai.agent.idset_agent() / withAgent()Agent identifier
Last updated on