Concepts
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| Level | What it represents | Example |
|---|---|---|
| Organization | Team or company | Acme Corp |
| Project | Product, environment, or application | support-assistant, staging-agents |
| System / Service | Runtime emitting telemetry (from tracing service name) | api-server, agent-worker |
| Agent | Named AI unit handling work | An OpenAI Agent, a Claude session, a workflow component |
| Conversation | Multi-turn interaction from the user’s perspective | A chat thread, a task session |
| Response | One model output inside a conversation | A single assistant message |
| Feedback / Events | Signals attached to the user experience | Thumbs up/down, comments, product events |
Conversation Resolution
Introspection resolves conversations in this order:
- Explicit conversation ID — if your app sets
gen_ai.conversation.idvia the SDK, that value is used directly. - Previous response ID — if
previous_response_idis set, the response is linked to the conversation that contains that prior response. - History-based matching — if neither is set, Introspection looks at recent activity from the same user and service to find a likely match.
- 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 type | When to use | SDK method |
|---|---|---|
| User | Logged-in or stable users | set_user_id() / withUserId() |
| Anonymous | Pre-login, anonymous feedback, trial traffic | set_anonymous_id() / withAnonymousId() |
| Conversation | Multi-turn threads with a stable ID | set_conversation() / withConversation() |
| Agent | Multiple assistants or workflow components in one app | set_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 key | Set by | Meaning |
|---|---|---|
identity.user_id | set_user_id() / withUserId() | Authenticated user |
identity.anonymous_id | set_anonymous_id() / withAnonymousId() | Anonymous user |
gen_ai.conversation.id | set_conversation() / withConversation() | Conversation |
gen_ai.request.previous_response_id | set_conversation() / withConversation() | Link to a prior response |
gen_ai.agent.name | set_agent() / withAgent() | Agent name |
gen_ai.agent.id | set_agent() / withAgent() | Agent identifier |
Last updated on