-
Notifications
You must be signed in to change notification settings - Fork 708
[release/9.5] Fix GenAI visualizer when span is missing peer attribute #11765
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[release/9.5] Fix GenAI visualizer when span is missing peer attribute #11765
Conversation
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 11765Or
iex "& { $(irm https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 11765" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes a bug in the GenAI visualizer dialog where spans missing peer attributes would cause null reference issues. The fix ensures that when no peer resource or peer address is available, a fallback "unknown-peer" name is used instead of null.
Key changes:
- Added proper fallback handling for missing peer attributes in the GenAI visualizer dialog
- Made
PeerNameandSourceNameproperties required (non-nullable) to prevent null reference exceptions - Added comprehensive test coverage for the GenAI visualizer dialog scenarios
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
GenAIVisualizerDialogViewModel.cs |
Fixed null handling for peer names by making properties required and adding fallback logic |
GenAIVisualizerDialogTests.cs |
Added new test file with comprehensive test coverage for GenAI visualizer scenarios |
Program.cs |
Added test endpoint for GenAI trace with display error scenario |
src/Aspire.Dashboard/Model/GenAI/GenAIVisualizerDialogViewModel.cs
Outdated
Show resolved
Hide resolved
…l.cs Co-authored-by: Copilot <[email protected]>
|
Low Risk, customer reported, fixing a new feature. Approved. |
Customer Impact
A user reported an unhandled error in the dashboard when viewing some GenAI telemetry from Semantic Kernel. The problem is recorded telemetry doesn't have a peer attribute, which later causes an error when rendering the page.
The fix is to default the peer name to
unknown-peer(exact name doesn't matter, as long as it has a name). It now always has a value and there is no chance of NRE.Basically, before:
After:
Testing
Unit tests
Risk
Low
Regression?
No