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

Skip to content

Conversation

JamesNK
Copy link
Member

@JamesNK JamesNK commented Apr 30, 2025

Fixes #9015

Display only the trace option for uninstrumented peer resources:

image

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?

@davidfowl
Copy link
Member

This was a regression, hard to test?

@JamesNK
Copy link
Member Author

JamesNK commented Apr 30, 2025

Tests added

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 refactors telemetry-related menu construction for dashboard resources by moving test helpers to a dedicated file and adjusting the menu item creation based on whether the resource is instrumented.

  • Moved TestOutgoingPeerResolver implementation from TraceTests.cs into its own file for better test organization.
  • Updated ResourceMenuItems logic to conditionally include structured logs and metrics based on the telemetry application's instrumentation status.
  • Added a new test file to validate the menu items for uninstrumented peer resources.

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
tests/Aspire.Dashboard.Tests/TelemetryRepositoryTests/TraceTests.cs Removed redundant TestOutgoingPeerResolver helper to streamline test code.
tests/Aspire.Dashboard.Tests/TelemetryRepositoryTests/TestOutgoingPeerResolver.cs Introduces a consolidated implementation of TestOutgoingPeerResolver.
tests/Aspire.Dashboard.Tests/Model/ResourceMenuItemsTests.cs Updates tests to validate the updated menu items behavior for both telemetry and uninstrumented peer resources.
src/Aspire.Dashboard/Model/ResourceMenuItems.cs Adjusted logic to conditionally add telemetry menu items based on resource instrumentation status.

@danmoseley danmoseley merged commit 26dce9b into main Apr 30, 2025
174 checks passed
@danmoseley danmoseley deleted the jamesnk/telemetry-links branch April 30, 2025 19:34
@github-actions github-actions bot locked and limited conversation to collaborators May 31, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[AspireE2E] There should be no options for Structured logs, Traces, and Metrics in the action buttons of the cache container.
3 participants