Don't require gen_ai.system attribute on span events#11733
Conversation
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 11733Or
iex "& { $(irm https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 11733" |
There was a problem hiding this comment.
Pull Request Overview
This PR fixes an issue where GenAI messages weren't displayed in the dashboard visualizer when the gen_ai.system attribute was missing from span events. The OpenTelemetry specification only recommends this attribute, but the dashboard was requiring it, causing Semantic Kernel messages to be excluded.
- Removes the requirement for
gen_ai.systemattribute on span events in the GenAI visualizer - Updates the message detection logic to rely solely on event names for GenAI events
- Adds test coverage for GenAI events without the
gen_ai.systemattribute
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/Aspire.Dashboard/Model/GenAI/GenAIVisualizerDialogViewModel.cs | Updates message creation logic to detect GenAI events by name only, removing the system attribute requirement |
| tests/Aspire.Dashboard.Tests/Model/GenAIVisualizerDialogViewModelTests.cs | Adds test case for GenAI events without the gen_ai.system attribute |
|
/backport to release/9.5 |
|
Started backporting to release/9.5: https://github.com/dotnet/aspire/actions/runs/18121273259 |
Description
User reported issue that some GenAI messages weren't displayed in the visualizer. The problem is the dashboard incorrectly requires
gen_ai.systemattribute to be on span events, but the spec says they're only recommended: https://github.com/open-telemetry/semantic-conventions/blob/v1.36.0/docs/gen-ai/gen-ai-events.md#event-gen_aichoiceSemantic Kernel sometimes doesn't include the attribute. Its messages end up missing from the UI.
Checklist
<remarks />and<code />elements on your triple slash comments?doc-ideatemplatebreaking-changetemplatediagnostictemplate