Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

JamesNK
Copy link
Member

@JamesNK JamesNK commented Sep 16, 2025

Description

Span details now includes a link to the span's destination.

image

Fixes #10695

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?

@Copilot Copilot AI review requested due to automatic review settings September 16, 2025 04:44
Copy link
Contributor

github-actions bot commented Sep 16, 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 -- 11424

Or

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

Copy link
Contributor

@Copilot 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 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 to OtlpSpan 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)
Copy link
Member

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?

Copy link
Member Author

@JamesNK JamesNK Sep 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's for when a client calling a server, and the server is configured with OTEL.

For example, frontend calls basketservice and they are both .NET projects with telemetry enabled. The client span has one server span child and so a destination is added:

image

@JamesNK JamesNK merged commit 13fd1a1 into main Sep 17, 2025
606 of 609 checks passed
@JamesNK JamesNK deleted the jamesnk/span-details-destination branch September 17, 2025 00:59
@dotnet-policy-service dotnet-policy-service bot added this to the 9.5 milestone Sep 17, 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.

Add link to outgoing uninstrumented peer resource
2 participants