Skip to content

Make OTLP and resource service config optional in app host - #16046

Merged
James Newton-King (JamesNK) merged 24 commits into
microsoft:mainfrom
afscrome:dynamic-urls
May 23, 2026
Merged

Make OTLP and resource service config optional in app host#16046
James Newton-King (JamesNK) merged 24 commits into
microsoft:mainfrom
afscrome:dynamic-urls

Conversation

@afscrome

@afscrome Alex Crome (afscrome) commented Apr 10, 2026

Copy link
Copy Markdown
Collaborator

Description

Make it so that aspire can use dynamic ports for ASPIRE_DASHBOARD_OTLP_ENDPOINT_URL, ASPIRE_RESOURCE_SERVICE_ENDPOINT_URL and other urls that previously had to be specifeid in launchsettings.json if they're missing.

This does a number of things such as:

  • Make it easier to use a dashboard within tests - you can now enable the dashboad simply by setting DistributedApplicationBuilderOptions.DisableDashboard = false, and not needing to set a bunch of magic env vars. (Which then get ignored anyway due to Port randomisation for testing)

  • A single file app host should now be possible, without needing to specify aspire.config.json or apphost.run.json. (Not quite possible yet due to Dashboard doesn't load if ASPNETCORE_ENVIRONMENT is not Development #16069)

Helps towards #15999 and #13746

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?

Make it so that aspire can use dynamic ports for `ASPIRE_DASHBOARD_OTLP_ENDPOINT_URL`, `ASPIRE_RESOURCE_SERVICE_ENDPOINT_URL` and other urls that previously had to be specifeid in `launchsettings.json` if they're missing.

This does a number of things such as:

- Make it easier to use a dashboard within tests - you can now enable the dashboad simply by setting `DistributedApplicationBuilderOptions.DisableDashboard = false`

- A single file app host should now be possible, without needing to specify `aspire.config.json` or `apphost.run.json`
@github-actions

github-actions Bot commented Apr 10, 2026

Copy link
Copy Markdown
Contributor

🚀 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/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 16046

Or

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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Updates Aspire dashboard/resource-service configuration to treat several URL settings as optional, enabling dynamic port allocation (reducing the need for launchSettings.json-pinned URLs) and making it easier to enable the dashboard in tests and single-file app host scenarios.

Changes:

  • Relaxes transport/dashboard option validation so missing/blank URLs can succeed and be dynamically allocated.
  • Auto-configures dashboard frontend + OTLP endpoints when configuration is missing/blank.
  • Updates/extends tests and removes pinned dashboard/resource-service URL env vars from many playground launch profiles/config files.

Reviewed changes

Copilot reviewed 73 out of 77 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
tests/Aspire.Hosting.Tests/Dashboard/TransportOptionsValidatorTests.cs Updates expectations so missing/blank URLs validate successfully.
tests/Aspire.Hosting.Tests/Dashboard/DashboardResourceTests.cs Adds coverage for dynamic OTLP + frontend endpoint auto-configuration.
tests/Aspire.Hosting.Tests/Dashboard/DashboardOptionsTests.cs Adds coverage for blank OTLP endpoint normalization to null.
src/Aspire.Hosting/Dashboard/TransportOptionsValidator.cs Makes app/OTLP/resource-service URL settings optional (only validate when present).
src/Aspire.Hosting/Dashboard/DashboardServiceHost.cs Chooses default scheme for dynamic resource service hosting based on AllowUnsecuredTransport.
src/Aspire.Hosting/Dashboard/DashboardOptions.cs Normalizes blank OTLP endpoint URLs to null; removes dashboard option validation.
src/Aspire.Hosting/Dashboard/DashboardEventHandlers.cs Adds dynamic dashboard frontend endpoint when ASPNETCORE_URLS missing; always adds OTLP endpoint annotations.
playground/yarp/Yarp.AppHost/Properties/launchSettings.json Removes pinned dashboard/resource-service endpoint env vars; updates applicationUrl host.
playground/withdockerfile/WithDockerfile.AppHost/Properties/launchSettings.json Removes pinned dashboard/resource-service endpoint env vars; updates applicationUrl host.
playground/webpubsub/WebPubSub.AppHost/Properties/launchSettings.json Removes pinned dashboard OTLP env var; updates applicationUrl host.
playground/waitfor/WaitForSandbox.DbSetup/Properties/launchSettings.json JSON formatting fix (closing brace).
playground/waitfor/WaitForSandbox.AppHost/Properties/launchSettings.json Removes pinned dashboard/resource-service endpoint env vars; updates applicationUrl host.
playground/TypeScriptApps/RpsArena/aspire.config.json Removes pinned dashboard/resource-service endpoint env vars from profile.
playground/TypeScriptApps/RpsArena/apphost.run.json Removes pinned dashboard/resource-service endpoint env vars; JSON formatting fix.
playground/TypeScriptApps/AzureFunctionsSample/AppHost/apphost.run.json Removes pinned dashboard/resource-service endpoint env vars; JSON formatting fix.
playground/TypeScriptAppHost/apphost.run.json Removes pinned dashboard/resource-service endpoint env vars.
playground/TestShop/TestShop.AppHost/Properties/launchSettings.json Removes pinned dashboard/resource-service endpoint env vars; updates applicationUrl host.
playground/Stress/Stress.AppHost/Properties/launchSettings.json Removes pinned dashboard/resource-service endpoint env vars; updates applicationUrl host.
playground/SqlServerScript/AppHost1/Properties/launchSettings.json Removes pinned dashboard OTLP env var.
playground/SqlServerEndToEnd/SqlServerEndToEnd.DbSetup/Properties/launchSettings.json JSON formatting fix (closing brace).
playground/SqlServerEndToEnd/SqlServerEndToEnd.AppHost/Properties/launchSettings.json Removes pinned dashboard/resource-service endpoint env vars; updates applicationUrl host; JSON formatting fix.
playground/signalr/SignalR.AppHost/Properties/launchSettings.json Removes pinned dashboard/resource-service endpoint env vars; updates applicationUrl host.
playground/seq/Seq.AppHost/Properties/launchSettings.json Removes pinned dashboard/resource-service endpoint env vars; updates applicationUrl host.
playground/Redis/Redis.AppHost/Properties/launchSettings.json Removes pinned dashboard/resource-service endpoint env vars; updates applicationUrl host.
playground/Qdrant/Qdrant.AppHost/Properties/launchSettings.json Removes pinned dashboard/resource-service endpoint env vars; updates applicationUrl host.
playground/PythonAppHost/apphost.run.json Removes pinned dashboard/resource-service endpoint env vars (keeps MCP endpoint).
playground/python/Python.AppHost/Properties/launchSettings.json Removes pinned dashboard/resource-service endpoint env vars; updates applicationUrl host.
playground/publishers/Publishers.DbSetup/Properties/launchSettings.json JSON formatting fix (closing brace).
playground/publishers/Publishers.AppHost/Properties/launchSettings.json Removes pinned dashboard/resource-service endpoint env vars; updates applicationUrl host.
playground/ProxylessEndToEnd/ProxylessEndToEnd.AppHost/Properties/launchSettings.json Removes pinned dashboard/resource-service endpoint env vars; updates applicationUrl host.
playground/ProjectResourceExtensions/ProjectResourceExtensions.AppHost/Properties/launchSettings.json Removes pinned dashboard/resource-service endpoint env vars; updates applicationUrl host.
playground/PostgresEndToEnd/PostgresEndToEnd.AppHost/Properties/launchSettings.json Removes pinned dashboard/resource-service endpoint env vars; updates applicationUrl host.
playground/pipelines/Pipelines.AppHost/Properties/launchSettings.json Removes pinned dashboard/resource-service endpoint env vars; updates applicationUrl host.
playground/ParameterEndToEnd/ParameterEndToEnd.AppHost/Properties/launchSettings.json Removes pinned dashboard/resource-service endpoint env vars; updates applicationUrl host.
playground/orleans/Orleans.AppHost/Properties/launchSettings.json Removes pinned dashboard/resource-service endpoint env vars; updates applicationUrl host.
playground/OracleEndToEnd/OracleEndToEnd.AppHost/Properties/launchSettings.json Removes pinned dashboard/resource-service endpoint env vars; updates applicationUrl host.
playground/OpenAIEndToEnd/OpenAIEndToEnd.AppHost/Properties/launchSettings.json Removes pinned dashboard/resource-service endpoint env vars; updates applicationUrl host.
playground/nats/Nats.AppHost/Properties/launchSettings.json Removes pinned dashboard/resource-service endpoint env vars; updates applicationUrl host.
playground/mysql/MySqlDb.AppHost/Properties/launchSettings.json Removes pinned dashboard/resource-service endpoint env vars; updates applicationUrl host.
playground/mongo/Mongo.AppHost/Properties/launchSettings.json Removes pinned dashboard/resource-service endpoint env vars; updates applicationUrl host.
playground/milvus/MilvusPlayground.AppHost/Properties/launchSettings.json Removes pinned dashboard/resource-service endpoint env vars; updates applicationUrl host.
playground/keycloak/Keycloak.AppHost/Properties/launchSettings.json Removes pinned dashboard/resource-service endpoint env vars; updates applicationUrl host.
playground/kafka/KafkaBasic.AppHost/Properties/launchSettings.json Removes pinned dashboard/resource-service endpoint env vars; updates applicationUrl host.
playground/JavaAppHost/aspire.config.json Removes pinned dashboard/resource-service endpoint env vars; updates applicationUrl host.
playground/HealthChecks/HealthChecksSandbox.AppHost/Properties/launchSettings.json Removes pinned dashboard/resource-service endpoint env vars; updates applicationUrl host.
playground/GitHubModelsEndToEnd/GitHubModelsEndToEnd.AppHost/Properties/launchSettings.json Removes pinned dashboard/resource-service endpoint env vars; updates applicationUrl host.
playground/FoundryEndToEnd/FoundryEndToEnd.AppHost/Properties/launchSettings.json Removes pinned dashboard/resource-service endpoint env vars; updates applicationUrl host.
playground/FoundryAgentBasic/FoundryAgentBasic.AppHost/Properties/launchSettings.json Removes pinned dashboard/resource-service endpoint env vars; updates applicationUrl host.
playground/FileBasedApps/apphost.settings.json Adds Dashboard config section (DetailedErrors).
playground/FileBasedApps/apphost.run.json.old Removes pinned dashboard/resource-service endpoint env vars.
playground/ExternalServices/ExternalServices.AppHost/Properties/launchSettings.json Removes pinned dashboard/resource-service endpoint env vars; updates applicationUrl host.
playground/DotnetTool/DotnetTool.AppHost/Properties/launchSettings.json Removes pinned dashboard/resource-service endpoint env vars; updates applicationUrl host.
playground/DevTunnels/DevTunnels.AppHost/Properties/launchSettings.json Removes pinned dashboard/resource-service endpoint env vars; updates applicationUrl host.
playground/deployers/Deployers.AppHost/Properties/launchSettings.json Removes pinned dashboard/resource-service endpoint env vars; updates applicationUrl host.
playground/DatabaseMigration/DatabaseMigration.AppHost/Properties/launchSettings.json Removes pinned dashboard/resource-service endpoint env vars; updates applicationUrl host.
playground/CustomResources/CustomResources.AppHost/Properties/launchSettings.json Removes pinned dashboard/resource-service endpoint env vars; updates applicationUrl host.
playground/CosmosEndToEnd/CosmosEndToEnd.AppHost/Properties/launchSettings.json Removes pinned dashboard/resource-service endpoint env vars; updates applicationUrl host.
playground/cdk/CdkSample.AppHost/Properties/launchSettings.json Removes pinned dashboard/resource-service endpoint env vars; updates applicationUrl host.
playground/BrowserTelemetry/BrowserTelemetry.AppHost/Properties/launchSettings.json Removes pinned OTLP/resource-service endpoint env vars; updates applicationUrl host.
playground/bicep/BicepSample.AppHost/Properties/launchSettings.json Removes pinned dashboard/resource-service endpoint env vars; updates applicationUrl host.
playground/AzureVirtualNetworkEndToEnd/AzureVirtualNetworkEndToEnd.AppHost/Properties/launchSettings.json Removes pinned dashboard/resource-service endpoint env vars; updates applicationUrl host.
playground/AzureStorageEndToEnd/AzureStorageEndToEnd.AppHost/Properties/launchSettings.json Removes pinned dashboard/resource-service endpoint env vars; updates applicationUrl host.
playground/AzureServiceBus/ServiceBus.AppHost/Properties/launchSettings.json Removes pinned dashboard/resource-service endpoint env vars; updates applicationUrl host.
playground/AzureSearchEndToEnd/AzureSearch.AppHost/Properties/launchSettings.json Removes pinned dashboard/resource-service endpoint env vars; updates applicationUrl host.
playground/AzureOpenAIEndToEnd/AzureOpenAIEndToEnd.WebStory/Properties/launchSettings.json JSON formatting fix (closing brace).
playground/AzureOpenAIEndToEnd/AzureOpenAIEndToEnd.AppHost/Properties/launchSettings.json Removes pinned dashboard/resource-service endpoint env vars; updates applicationUrl host.
playground/AzureKusto/AzureKusto.AppHost/Properties/launchSettings.json Removes pinned dashboard/resource-service endpoint env vars; updates applicationUrl host.
playground/AzureFunctionsWithDts/AzureFunctionsWithDts.AppHost/Properties/launchSettings.json Removes pinned dashboard/resource-service endpoint env vars; updates applicationUrl host.
playground/AzureFunctionsEndToEnd/AzureFunctionsEndToEnd.AppHost/Properties/launchSettings.json Removes pinned dashboard/resource-service endpoint env vars; updates applicationUrl host.
playground/AzureDataLakeEndToEnd/AzureDataLakeEndToEnd.AppHost/Properties/launchSettings.json Removes pinned dashboard/resource-service endpoint env vars; updates applicationUrl host.
playground/AzureContainerApps/AzureContainerApps.AppHost/Properties/launchSettings.json Removes pinned dashboard/resource-service endpoint env vars; updates applicationUrl host.
playground/AzureAppService/AzureAppService.AppHost/Properties/launchSettings.json Removes pinned dashboard/resource-service endpoint env vars; updates applicationUrl host.
playground/AzureAppConfiguration/AzureAppConfiguration.AppHost/Properties/launchSettings.json Removes pinned dashboard/resource-service endpoint env vars; updates applicationUrl host.
playground/AspireWithNode/AspireWithNode.AppHost/Properties/launchSettings.json Removes pinned dashboard/resource-service endpoint env vars; updates applicationUrl host.
playground/AspireWithMaui/AspireWithMaui.AppHost/Properties/launchSettings.json Removes pinned dashboard/resource-service endpoint env vars; updates applicationUrl host.
playground/AspireWithJavaScript/AspireJavaScript.AppHost/Properties/launchSettings.json Removes pinned dashboard/resource-service endpoint env vars; updates applicationUrl host.
playground/AspireEventHub/EventHubs.AppHost/Properties/launchSettings.json Removes pinned dashboard/resource-service endpoint env vars; updates applicationUrl host.

Comment thread src/Aspire.Hosting/Dashboard/DashboardEventHandlers.cs Outdated
Comment thread src/Aspire.Hosting/Dashboard/DashboardEventHandlers.cs Outdated
Comment thread src/Aspire.Hosting/Dashboard/DashboardOptions.cs Outdated
Comment thread src/Aspire.Hosting/Dashboard/DashboardEventHandlers.cs
@github-actions

Copy link
Copy Markdown
Contributor

Re-running the failed jobs in the CI workflow for this pull request because 1 job was identified as retry-safe transient failures in the CI run attempt.
GitHub was asked to rerun all failed jobs for that attempt, and the rerun is being tracked in the rerun attempt.
The job links below point to the failed attempt jobs that matched the retry-safe transient failure rules.

Comment thread playground/FileBasedApps/apphost.run.json.old Outdated
Comment thread playground/FileBasedApps/apphost.settings.json Outdated

@davidfowl David Fowler (davidfowl) left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

When OTLP endpoint URLs are not specified (null/blank), CreateDashboardOtlpEndpointAnnotation always creates endpoints with "https" scheme, even when ASPIRE_ALLOW_UNSECURED_TRANSPORT=true.

The frontend dashboard endpoint correctly respects allowUnsecureTransport to choose http vs https (line ~422-424), but the OTLP endpoints dont — CreateDashboardOtlpEndpointAnnotation hardcodes "https" when endpointUrl is null (line ~642).

This means when users set ASPIRE_ALLOW_UNSECURED_TRANSPORT=true and dont specify OTLP URLs, the dashboard will try to bind OTLP endpoints using HTTPS, which will fail without dev certificates — defeating the purpose of the flag.

Suggested fix: Pass allowUnsecuredTransport to CreateDashboardOtlpEndpointAnnotation and use it for the default scheme:

uriScheme: allowUnsecuredTransport ? "http" : "https"

Also missing a test case combining allowUnsecuredTransport=true with blank OTLP URLs to verify they use HTTP.

@github-actions

Copy link
Copy Markdown
Contributor

Re-running the failed jobs in the CI workflow for this pull request because 1 job was identified as retry-safe transient failures in the CI run attempt.
GitHub was asked to rerun all failed jobs for that attempt, and the rerun is being tracked in the rerun attempt.
The job links below point to the failed attempt jobs that matched the retry-safe transient failure rules.

@JamesNK James Newton-King (JamesNK) changed the title Make url configuration optional Make OTLP and resource service config optional in app host Apr 13, 2026
@JamesNK

James Newton-King (JamesNK) commented Apr 13, 2026

Copy link
Copy Markdown
Member

I haven't looked at code yet, just some local testing. However, I found that no telemetry is recorded to the dashboard.

The problem is the random endpoints in the app host aren't injected into the resources.

After running TestShop I can see the dashboard is hosting with what look like random ports:
image

But the OTLP endpoint injected into frontend is the default value:
image

Telemetry is being sent to 18889 but the dashboard is listening on 51134.

Ensuring that TestShop and Browser samples (to ensure CORS works) are good manual tests.

Comment thread src/Aspire.Hosting/Dashboard/DashboardEventHandlers.cs
Comment thread src/Aspire.Hosting/Dashboard/DashboardEventHandlers.cs Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

1 issue found: a bug where CORS configuration for the OTLP HTTP endpoint is silently skipped when using dynamic ports (the new default).

Comment thread src/Aspire.Hosting/Dashboard/DashboardEventHandlers.cs
Comment thread src/Aspire.Hosting/Dashboard/DashboardEventHandlers.cs Outdated
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@adamint

Copy link
Copy Markdown
Member

Pushed b49462051a with the targeted dashboard defaults updates from #17371, without bringing over unrelated changes.

What changed:

  • Preserved Make OTLP and resource service config optional in app host #16046's AllowUnsecuredTransport-based scheme behavior.
  • When neither OTLP endpoint is configured, the dashboard now creates dynamic defaults for both OTLP/gRPC and OTLP/HTTP so browser telemetry/CORS works without explicit launch profile config.
  • Kept explicit endpoint behavior unchanged: configuring only gRPC or only HTTP does not invent the other endpoint.
  • Resolved allocated dynamic OTLP endpoint URLs before writing the dashboard startup summary, so the summary logs the actual gRPC and HTTP URLs.
  • Added/updated coverage in DashboardResourceTests and DashboardEventHandlersTests.

Validation:

dotnet test --project tests/Aspire.Hosting.Tests/Aspire.Hosting.Tests.csproj --no-launch-profile -- --filter-class "*.DashboardResourceTests" --filter-class "*.DashboardEventHandlersTests" --filter-not-trait "quarantined=true" --filter-not-trait "outerloop=true"

Result: 51 passed, 0 failed.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@adamint

Copy link
Copy Markdown
Member

Pushed follow-up a9f3fb5dd0 after rechecking alignment with #16046's existing approach.

The endpoint creation behavior was already aligned: dynamic OTLP/HTTP is added only when neither OTLP endpoint is configured, while explicit gRPC-only or HTTP-only configuration remains unchanged.

The follow-up tightens startup summary logging so explicit OTLP URLs keep using the configured values, and allocated endpoint URLs are only resolved for dynamic defaults. Added a regression test for that explicit-config case.

Validation now covers 52 dashboard tests, all passing:

dotnet test --project tests/Aspire.Hosting.Tests/Aspire.Hosting.Tests.csproj --no-launch-profile -- --filter-class "*.DashboardResourceTests" --filter-class "*.DashboardEventHandlersTests" --filter-not-trait "quarantined=true" --filter-not-trait "outerloop=true"

@adamint

Copy link
Copy Markdown
Member

Alex Crome (@afscrome) I pushed some changes to your branch based on the linked pr - I accidentally duplicated some of the work done here.

@adamint

Copy link
Copy Markdown
Member

Ran PR dogfood testing for the current head a9f3fb5dd0.

Result: passed for the dynamic dashboard endpoint scenario.

What was tested:

  • Installed the PR CLI from the dogfood artifact and verified the version matched the PR head: 13.4.0-pr.16046.ga9f3fb5d.
  • Created a fresh AppHost from the PR package hive.
  • Removed explicit dashboard OTLP/resource-service endpoint settings from the generated profile to exercise the new dynamic-default path.
  • Started the AppHost with aspire start --isolated.
  • Verified the hidden dashboard resource was Running/Healthy.
  • Verified dynamic resource-service, OTLP/gRPC, and OTLP/HTTP endpoints were present.
  • Verified the startup summary logged both OTLP/gRPC and OTLP/HTTP URLs.
  • Stopped the AppHost and confirmed no AppHost remained running.

Note: the first attempt from a long macOS temp path hit the known Unix domain socket path-length limit. Retried from /tmp/a16046test, which avoided that environment issue.

@JamesNK

James Newton-King (JamesNK) commented May 22, 2026

Copy link
Copy Markdown
Member

Pushed follow-up a9f3fb5dd0 after rechecking alignment with #16046's existing approach.

The endpoint creation behavior was already aligned: dynamic OTLP/HTTP is added only when neither OTLP endpoint is configured, while explicit gRPC-only or HTTP-only configuration remains unchanged.

The follow-up tightens startup summary logging so explicit OTLP URLs keep using the configured values, and allocated endpoint URLs are only resolved for dynamic defaults. Added a regression test for that explicit-config case.

Validation now covers 52 dashboard tests, all passing:

dotnet test --project tests/Aspire.Hosting.Tests/Aspire.Hosting.Tests.csproj --no-launch-profile -- --filter-class "*.DashboardResourceTests" --filter-class "*.DashboardEventHandlersTests" --filter-not-trait "quarantined=true" --filter-not-trait "outerloop=true"

I reverted this because it's different from the frontend URL behavior. It prefers the dynamic URL when printing a value to the user. And I don't understand what scenario this is fixing.

c08634e (this PR)

If it needs to be this way then it can change back in another commit or PR.

Refactor DashboardEventHandlers to compute an EndpointGenerationContext
during dashboard URL parsing. When OTLP endpoints are dynamically
generated (no explicit URL configured), they now inherit the TargetHost
from the dashboard URL with a matching scheme, falling back to localhost.

Add test verifying OTLP endpoint TargetHost inheritance from dashboard URLs.
@JamesNK

Copy link
Copy Markdown
Member

Ok, I figured out the problem the change was to solve. No target host was set on the generated URLs so they were localhost instead of a localhost.dev host name.

Fixed by passing the target host to the generated OLTP endpoints.

…ertions

OTLP endpoints always use HTTPS and only inherit the dashboard's
localhost TLD host when the dashboard scheme matches the endpoint
context scheme. Add expectedOtlpHost parameter to correctly assert
per test case.
@github-actions

Copy link
Copy Markdown
Contributor

Re-running the failed jobs in the CI workflow for this pull request because 1 job was identified as retry-safe transient failures in the CI run attempt.
GitHub was asked to rerun all failed jobs for that attempt, and the rerun is being tracked in the rerun attempt.
The job links below point to the failed attempt jobs that matched the retry-safe transient failure rules.

Extract a shared helper method that logs scheme, host, and port (or
<random>) when dashboard endpoints are added. Reuse it for both
frontend and OTLP endpoint configuration paths.
Comment thread src/Aspire.Hosting/Dashboard/DashboardServiceHost.cs Outdated
Comment thread src/Aspire.Hosting/Dashboard/DashboardServiceHost.cs Outdated
Co-authored-by: James Newton-King <james@newtonking.com>
@JamesNK
James Newton-King (JamesNK) enabled auto-merge (squash) May 23, 2026 05:31
@JamesNK
James Newton-King (JamesNK) merged commit 69c48db into microsoft:main May 23, 2026
311 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 22, 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.

5 participants