A TensorSharp contributor noticed a strange mismatch: Application Insights showed gen_ai.input.messages and gen_ai.output.messages under Metadata, but the Input + Output tab was empty. The model had answered and the span had arrived. Why couldn’t the viewer show the conversation?
The exporter was writing each message with a top-level content field. The GenAI viewer looked for typed parts . 1w2w3y sent two otherwise identical chat spans to the same Application Insights resource. The flat form left the tab empty; the parts form rendered the system message, user message, and answer.
{ "role" : "user" , "content" : "Hello" }
Enter fullscreen mode
Exit fullscreen mode
{ "role" : "user" , "parts" : [ { "type" : "text" , "content" : "Hello" } ] }
Enter fullscreen mode
Exit fullscreen mode
The fix also models assistant calls as tool_call parts and tool results as tool_call_response parts.…