-
Notifications
You must be signed in to change notification settings - Fork 753
Log entries for a GenAI span now link to GenAI visualizer #13411
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
Conversation
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 13411Or
iex "& { $(irm https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 13411" |
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 enhances the structured logs page to display a GenAI visualizer button for log entries that belong to spans with GenAI telemetry. The main improvement is that the system now checks not only if the log entry itself has GenAI attributes, but also whether its associated span has GenAI attributes.
Key changes:
- Renamed
IsGenAISpantoHasGenAIAttributeinGenAIHelpersfor better clarity about what the method checks - Added
IsGenAILogEntrymethod to determine if a log entry should show the GenAI visualizer button by checking both the log entry and its associated span - Updated the context span retrieval logic to filter by SpanId/TraceId fields instead of the GenAISystem field
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/Aspire.Dashboard/Model/GenAI/GenAIHelpers.cs | Renamed helper method from IsGenAISpan to HasGenAIAttribute for clarity |
| src/Aspire.Dashboard/Components/ResourcesGridColumns/LogMessageColumnDisplay.razor.cs | Added IsGenAILogCallback parameter to support custom GenAI detection logic |
| src/Aspire.Dashboard/Components/ResourcesGridColumns/LogMessageColumnDisplay.razor | Simplified GenAI detection by delegating to callback instead of inline logic |
| src/Aspire.Dashboard/Components/Pages/TraceDetail.razor.cs | Updated call to renamed HasGenAIAttribute method |
| src/Aspire.Dashboard/Components/Pages/StructuredLogs.razor.cs | Added IsGenAILogEntry method and updated context span retrieval to check both log and span attributes |
| src/Aspire.Dashboard/Components/Pages/StructuredLogs.razor | Wired up the new IsGenAILogCallback parameter |
| src/Aspire.Dashboard/Components/Controls/SpanDetails.razor.cs | Updated call to renamed HasGenAIAttribute method |
|
@copilot To improve performance, update OtlpLogEntry and OtlpSpan with a property for whether they have GenAI information. This should be calculated in the repository when a log entry or span is added/removed. See |
|
This looks fine although I cannot test at the moment due to what is probably an unrelated blazor issue. |
Description
Improve structured logs page to link to GenAI visualizer when the log entry belongs to a span with GenAI telemetry.
note: This button isn't new. It would appear if the log entry contained GenAI telemetry. Now it also appears if the log entry is for a span and the span has GenAI telemetry.
Checklist
<remarks />and<code />elements on your triple slash comments?doc-ideatemplatebreaking-changetemplatediagnostictemplate