-
Notifications
You must be signed in to change notification settings - Fork 694
Add destination to span details #11424
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 -- 11424 Or
iex "& { $(irm https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 11424" |
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 adds destination information to span details in the Aspire Dashboard, providing a link to the span's destination resource when available. The destination is determined from either an uninstrumented peer or a single child span with a different resource that acts as a server/consumer.
Key Changes
- Added
GetDestination()
method toOtlpSpan
to calculate span destinations - Split span properties into known properties and attribute properties for better organization
- Enhanced span details UI to display destination as a clickable resource link
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
src/Aspire.Dashboard/Otlp/Model/OtlpSpan.cs | Added GetDestination() method and split AllProperties() into GetKnownProperties() and GetAttributeProperties() |
src/Aspire.Dashboard/Model/SpanDetailsViewModel.cs | Updated to use new property methods and add destination to span details |
src/Aspire.Dashboard/Model/Otlp/SpanWaterfallViewModel.cs | Updated TraceDetailState record and method signatures to include AllResources parameter |
src/Aspire.Dashboard/Model/Otlp/KnownTraceFields.cs | Added DestinationField constant |
src/Aspire.Dashboard/Extensions/CollectionExtensions.cs | Added SingleOrNull extension method |
src/Aspire.Dashboard/Components/Pages/TraceDetail.razor.cs | Updated to pass resources to TraceDetailState |
src/Aspire.Dashboard/Components/Controls/SpanDetails.razor.cs | Added destination display logic with ResourceNameButtonValue component |
tests/Aspire.Dashboard.Tests/TelemetryRepositoryTests/OtlpSpanTests.cs | Added comprehensive tests for GetDestination() method and updated existing tests |
tests/Aspire.Dashboard.Tests/Model/SpanWaterfallViewModelTests.cs | Updated test calls to include new AllResources parameter in TraceDetailState |
} | ||
else | ||
{ | ||
if (GetChildSpans().SingleOrNull() is { } childSpan) |
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.
What's an example of this?
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.
Description
Span details now includes a link to the span's destination.
Fixes #10695
Checklist
<remarks />
and<code />
elements on your triple slash comments?doc-idea
templatebreaking-change
templatediagnostic
template