Don't require gen_ai.system attribute on span events#11733
Merged
Conversation
Contributor
|
🚀 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" |
Contributor
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 |
Member
Author
|
/backport to release/9.5 |
Contributor
|
Started backporting to release/9.5: https://github.com/dotnet/aspire/actions/runs/18121273259 |
mitchdenny
approved these changes
Sep 30, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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