gen_ai.{role}.message
and capture conversation flow:
gen_ai.system.message
gen_ai.user.message
gen_ai.assistant.message
gen_ai.tool.message
gen_ai.choice
event_timestamp
: ISO 8601 timestampattributes
: Contains gen_ai.system
(required) and other metadatasource
: Optional span ID referencegen_ai.choice
events with finish reasons, tool calls, and response metadata.
gen_ai.assistant.message
with tool_calls
→ AI requests function executiongen_ai.tool.message
with matching id
→ Function execution resultgen_ai.assistant.message
→ AI processes function result