Skip to content

Conversation

@JamesNK
Copy link
Member

@JamesNK JamesNK commented Oct 1, 2025

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:

PeerName = OtlpHelpers.GetPeerAddress(viewModel.Span.Attributes)!; // <- bad null suppression

After:

PeerName = OtlpHelpers.GetPeerAddress(viewModel.Span.Attributes) ?? "unknown-peer";

Testing

Unit tests

Risk

Low

Regression?

No

@JamesNK JamesNK added area-dashboard Servicing-consider Issue for next servicing release review labels Oct 1, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Oct 1, 2025

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 11765

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 11765"

Copy link
Contributor

Copilot AI left a 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 PeerName and SourceName properties 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

@JamesNK JamesNK added this to the 9.5.1 milestone Oct 1, 2025
@joperezr
Copy link
Member

joperezr commented Oct 1, 2025

Low Risk, customer reported, fixing a new feature. Approved.

@joperezr joperezr added Servicing-approved Approved for servicing release and removed Servicing-consider Issue for next servicing release review labels Oct 1, 2025
@JamesNK JamesNK requested review from adamint and mitchdenny October 2, 2025 00:18
This was referenced Oct 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-dashboard Servicing-approved Approved for servicing release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants