Skip to content

Fix otel commands for dev.localhost dashboard URLs - #16688

Closed
David Fowler (davidfowl) with Copilot wants to merge 3 commits into
mainfrom
copilot/fix-otel-commands-host-resolution
Closed

Fix otel commands for dev.localhost dashboard URLs#16688
David Fowler (davidfowl) with Copilot wants to merge 3 commits into
mainfrom
copilot/fix-otel-commands-host-resolution

Conversation

Copilot AI commented May 2, 2026

Copy link
Copy Markdown
Contributor

Description

aspire otel commands can receive AppHost-discovered dashboard API URLs using *.dev.localhost, which may not resolve from the CLI process even though the dashboard is reachable on localhost. This causes telemetry commands such as otel traces, otel logs, and otel spans to fail before contacting the dashboard API.

  • Dashboard URL normalization
    • Normalize AppHost-discovered *.dev.localhost dashboard API URLs to localhost.
    • Preserve scheme, port, path, query string, and fragment.
https://nextapp1.dev.localhost:64876/login?t=abc
→ https://localhost:64876/login?t=abc
  • Telemetry command coverage

    • Apply normalization before otel commands create dashboard API requests.
    • Normalize dashboard hyperlink URLs returned through the same discovery path.
  • Shared MCP path

    • Apply the same normalization in MCP dashboard info helpers so consumers of the auxiliary backchannel use reachable dashboard API URLs consistently.
  • Regression coverage

    • Added focused test coverage for a TypeScript-style *.dev.localhost dashboard API URL, verifying telemetry requests are sent to localhost.

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?

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • 7k6vsblobprodcus337.vsblob.vsassets.io
    • Triggering command: /usr/share/dotnet/dotnet dotnet test --project tests/Aspire.Cli.Tests/Aspire.Cli.Tests.csproj --no-launch-profile -- --filter-class *.TelemetryCommandTests --filter-not-trait quarantined=true --filter-not-trait outerloop=true (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI and others added 2 commits May 2, 2026 00:20
Agent-Logs-Url: https://github.com/microsoft/aspire/sessions/6a008f86-1bf8-4476-aa5c-b217eba541b8

Co-authored-by: davidfowl <95136+davidfowl@users.noreply.github.com>
Agent-Logs-Url: https://github.com/microsoft/aspire/sessions/6a008f86-1bf8-4476-aa5c-b217eba541b8

Co-authored-by: davidfowl <95136+davidfowl@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix aspire otel commands failing with 'No such host is known' error Fix otel commands for dev.localhost dashboard URLs May 2, 2026
@JamesNK

Copy link
Copy Markdown
Member

Replaced by #16708

@microsoft-github-policy-service microsoft-github-policy-service Bot added this to the 13.4 milestone May 3, 2026
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 3, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

aspire otel commands fail with 'No such host is known' when using *.dev.localhost URLs (TypeScript AppHost)

3 participants