Skip to content

Conversation

@JamesNK
Copy link
Member

@JamesNK JamesNK commented Sep 30, 2025

Description

User reported issue that some GenAI messages weren't displayed in the visualizer. The problem is the dashboard incorrectly requires gen_ai.system attribute 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_aichoice

Semantic Kernel sometimes doesn't include the attribute. Its messages end up missing from the UI.

Checklist

  • Is this feature complete?
    • Yes. Ready to ship.
    • No. Follow-up changes expected.
  • Are you including unit tests for the changes and scenario tests if relevant?
    • Yes
    • No
  • Did you add public API?
    • Yes
      • If yes, did you have an API Review for it?
        • Yes
        • No
      • Did you add <remarks /> and <code /> elements on your triple slash comments?
        • Yes
        • No
    • No
  • Does the change make any security assumptions or guarantees?
    • Yes
      • If yes, have you done a threat model and had a security review?
        • Yes
        • No
    • No
  • Does the change require an update in our Aspire docs?

@github-actions
Copy link
Contributor

🚀 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 -- 11733

Or

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

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 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.system attribute 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.system attribute

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

@JamesNK
Copy link
Member Author

JamesNK commented Sep 30, 2025

/backport to release/9.5

@github-actions
Copy link
Contributor

Started backporting to release/9.5: https://github.com/dotnet/aspire/actions/runs/18121273259

@JamesNK JamesNK merged commit b80a0ce into main Sep 30, 2025
312 checks passed
@dotnet-policy-service dotnet-policy-service bot added this to the 9.6 milestone Sep 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants