Menu

Why our GenAI traces had data but showed no prompts in Application Insights
📰

Why our GenAI traces had data but showed no prompts in Application Insights

#devcommunity#dev#parts#tool#viewer
Long article (287 words) — no AI summary yet.
Reading 0:00
15s threshold

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.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.