Skip to content

Make terminal-host telemetry opt-in - #20005

Merged
Mitch Denny (mitchdenny) merged 3 commits into
mainfrom
mitchdenny-terminal-host-traces
Sep 11, 2026
Merged

Mitch Denny (mitchdenny) merged 3 commits into
mainfrom
mitchdenny-terminal-host-traces

Conversation

@mitchdenny

Copy link
Copy Markdown
Member

Description

WithTerminal() currently exports telemetry from its hidden terminal-host helpers whenever an OTLP endpoint is available. Their logs register Aspire.TerminalHost in the dashboard's telemetry resource list, including the Traces filter, even when no spans are emitted.

Terminal-host logs, metrics, and traces are now disabled by default. The existing ShowTerminalHost = true option both reveals the helper resources and enables their diagnostic telemetry when an OTLP endpoint is available. Parent-resource telemetry and terminal interaction are unchanged.

  • Explicitly set a per-helper telemetry flag so inherited OTLP settings or diagnostic opt-in cannot enable hidden helpers.
  • Only configure OTLP exporters and telemetry startup diagnostics for opted-in helpers.
  • Preserve DCP's service name and instance ID so each helper's telemetry is associated with the correct resource and replica.
  • Update option documentation and add focused coverage for telemetry gating, provider registration, and resource identity.

User-facing usage

Use .WithTerminal() normally without exporting helper telemetry. To diagnose a terminal host, opt in with:

resource.WithTerminal(options => options.ShowTerminalHost = true);

Validation

  • Hosting terminal configuration and failure-diagnostic tests: 53 passed, 1 platform-specific skip.
  • TerminalHost telemetry and lifecycle tests: 20 passed in the selected run.
  • Ran a CLI-launched AppHost against locally built binaries with a default terminal and a two-replica project using ShowTerminalHost = true. All producers were alive, terminal input round-tripped, and only the two opted-in helpers exported logs. Exported service names and instance IDs matched DCP's resource identities despite ambient telemetry settings.
  • The daily-build reproduction showed helper logs and a telemetry resource entry, not actual trace rows; both the baseline and fixed runs had zero traces and spans.

The existing DownstreamPrimaryResizeIsForwardedUpstreamAsRawResizeFrame test timed out in an isolated run waiting for a resize frame and was excluded from the successful TerminalHost selection. It calls the unchanged instance RunAsync path rather than the modified telemetry entry point; it was not changed or quarantined.

Fixes # (issue)

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

Disable helper telemetry unless ShowTerminalHost is enabled, and preserve per-helper OTLP service identity for diagnostic runs.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 1c676f42-11fe-4ca3-9dba-8beeeca95fca
@github-actions

github-actions Bot commented Sep 9, 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://github.com/@raw/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 20005

Or

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

@github-actions
github-actions Bot requested a balanced review from Copilot September 9, 2026 06:42
@github-actions github-actions Bot added the area-app-model Issues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication label Sep 9, 2026
@github-actions

This comment has been minimized.

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.

Copilot review overview

🟢 Approval recommended

The reviewed changes have focused test coverage and no unresolved issues.

Review tier: Balanced
Findings: None

What changed in this PR

Makes terminal-host telemetry opt-in through ShowTerminalHost, preventing hidden helpers from exporting inherited telemetry.

Changes:

  • Gates helper telemetry and OTLP configuration behind explicit opt-in.
  • Preserves helper service and replica identities.
  • Adds focused telemetry and environment tests.
File Description
tests/​Aspire.TerminalHost.Tests/​TerminalHostTelemetryTests.cs Tests telemetry gating, providers, and identity.
tests/​Aspire.Hosting.Tests/​WithTerminalTests.cs Tests helper and parent environment behavior.
src/​Shared/​KnownConfigNames.cs Defines the telemetry opt-in variable.
src/​Aspire.TerminalHost/​TerminalHostTelemetry.cs Documents opt-in behavior.
src/​Aspire.TerminalHost/​TerminalHostApp.cs Conditionally configures telemetry.
src/​Aspire.Hosting/​TerminalResourceBuilderExtensions.cs Configures helper telemetry based on visibility.
src/​Aspire.Hosting/​ApplicationModel/​TerminalAnnotation.cs Documents the expanded option behavior.

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt.

@mitchdenny

Copy link
Copy Markdown
Member Author

PR Testing Report

PR Information

  • PR: Make terminal-host telemetry opt-in #20005 - Make terminal-host telemetry opt-in
  • Head tested: 78972bbca0b7b3bbe9500ba097f57d5de605048d
  • Tested: 2026-09-09, macOS ARM64
  • Result: The targeted telemetry behavior is verified against the PR artifacts. Restart recovery works with a new terminal attachment; an existing attachment did not survive restart.

Artifact Version Verification

  • Installed CLI: 13.6.0-pr.20005.g78972bbc, matching the PR head.
  • Hosting package: Aspire.Hosting/13.6.0-pr.20005.g78972bbc, confirmed in the generated AppHost's restored assets.
  • Terminal-host executable: The managed/aspire-managed executable inside that PR CLI's versioned bundle, confirmed from running resource metadata. No local-source binary override was used.
  • Artifacts: CI run 34320297397.
  • Status: Verified. The first installation preceded artifact publication; the unchanged dogfood installer succeeded after the macOS archive build completed.

Changes Analyzed

File Changed behavior
src/Aspire.Hosting/TerminalResourceBuilderExtensions.cs Per-helper opt-in flag and conditional OTLP configuration
src/Aspire.Hosting/ApplicationModel/TerminalAnnotation.cs ShowTerminalHost documentation
src/Aspire.TerminalHost/TerminalHostApp.cs Telemetry initialization gate and service identity preservation
src/Aspire.TerminalHost/TerminalHostTelemetry.cs Telemetry documentation
src/Shared/KnownConfigNames.cs Shared internal opt-in setting
tests/Aspire.Hosting.Tests/WithTerminalTests.cs Hosting environment coverage
tests/Aspire.TerminalHost.Tests/TerminalHostTelemetryTests.cs Provider gating and identity coverage

Categories: Hosting, shared terminal-host runtime, documentation, and tests. No dashboard implementation, templates, client integrations, VS Code extension, or CI infrastructure changes.

Test Setup

Used an isolated local install and three fresh projects generated with the PR template hive, not the earlier source-build fixtures.

curl -fsSL https://github.com/@raw/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh \
  | bash -s -- 20005 --install-path "$testDir/install" --skip-path --skip-extension

Template creation explicitly selected the PR hive and version, C#, --localhost-tld false, --suppress-agent-init, and --non-interactive. The starter also used --test-framework None --use-redis-cache false. AppHosts ran with --isolated; follow-up commands specified --apphost.

The experimental aspire terminal commands were enabled only in the temporary projects:

"$cli" config set features.terminalCommandsEnabled true --non-interactive

Terminal input was exercised through Hex1b; dashboard assertions and screenshots used headless Edge. No global CLI settings or repository files were changed.

Test Scenarios Executed

1. Default helpers, inherited settings, and parent telemetry

Coverage: Happy path and negative configuration case. Status: Passed.

Added default WithTerminal() to the starter API service and a /bin/cat executable. Launched with an ambient OTLP endpoint, service name, instance ID, ASPIRE_TERMINAL_HOST_TELEMETRY_ENABLED=true, and debug logging.

  • Both helpers were running but explicitly received telemetry opt-in false; no helper OTLP endpoint was injected.
  • The visible resource list was exactly apiservice, default-terminal, and webfrontend.
  • The actual dashboard Traces filter contained exactly (All), apiservice, and webfrontend. No helper or Aspire.TerminalHost resource appeared.
  • Structured logs came from the application services. Two successful GET /weatherforecast traces remained visible, with parent spans also retrieved by trace ID.
  • Parent runtime metrics remained available, including positive dotnet.process.memory.working_set samples.
  • Input round-tripped through the default terminal.

Evidence: default-traces-filter.png, default-terminal.svg, parent-metrics.png, default-traces-assertions.txt, parent-metric-values.txt, runtime-evidence.json.

2. Opted-in diagnostic replicas

Coverage: Happy path and replica identity. Status: Passed.

Created a real console project with two replicas and:

.WithReplicas(2)
.WithTerminal(options => options.ShowTerminalHost = true)

Both producers were alive, both helpers appeared in the resource list, and the workload responded to terminal input with echo: diagnostic-artifact-probe.

Exported log resource attributes exactly matched DCP's injected identities:

Service name Service instance ID
diagnostic-terminal-terminalhost-0 rfvxqgbz
diagnostic-terminal-terminalhost-1 ejtfkgxn

The dashboard Traces and Metrics selectors contained the two helper names. Live terminal-host metric instruments were present, and the accessible metric table showed aspire.terminalhost.consumer.connections = 2 for replica 1.

Evidence: diagnostic-resources.png, diagnostic-terminal.svg, diagnostic-traces-filter.png, diagnostic-metrics.png, helper-metric-values.txt, runtime-evidence.json.

3. Replica restart and terminal recovery

Coverage: Lifecycle/recovery. Status: Restart and reattachment passed; continuous attachment did not.

Restarted both concrete project instances using aspire resource <instance> restart. Both became running again, their process IDs changed, and terminal status reported one restart for each.

An exploratory assertion that the existing CLI attachment would continue accepting input failed: the attachment disconnected during restart. A fresh attachment successfully processed echo: after-restart-probe.

This run establishes recovery by reattachment, not transparent reconnection. It did not compare attachment continuity against the base branch, so this observation is not classified as a regression introduced by this PR.

Evidence: restarted-terminal.svg, before/after process IDs and attachment outcomes in runtime-evidence.json.

4. No dashboard and missing workload

Coverage: Boundary and expected failure. Status: Passed.

A fresh AppHost disabled the dashboard and cleared its OTLP endpoint configuration. A default terminal still started and round-tripped input.

A second resource referenced a deliberately nonexistent executable. It visibly entered FailedToStart; aspire wait ... --status up returned exit code 18, rather than silently succeeding. Its helper remained waiting for the nonexistent producer.

Evidence: no-endpoint-terminal.svg, failed-workload-wait.txt, runtime-evidence.json.

5. Standalone helper opted in without an endpoint

Coverage: Telemetry initialization boundary. Status: Passed.

Launched the actual packaged aspire-managed terminalhost with telemetry opt-in true, trace-level logging, and no OTEL_EXPORTER_OTLP_ENDPOINT. All three Unix sockets bound, the control socket accepted a connection, and telemetry startup stderr remained empty. The process was then stopped.

Evidence: runtime-evidence.json.

Coverage Limits

The helpers produced logs and metrics, not lifecycle activities. Therefore this run verifies their Traces resource-list behavior, but does not claim to have observed exported helper spans. Tracer-provider gating and identity are covered by the focused source tests added in this PR; those earlier local unit results are not represented as new artifact-test runs here.

CI Observations

The PR's TerminalHost tests passed on Linux and Windows.

Two other jobs initially failed and subsequently passed on retry:

At 07:19:41 UTC the final check snapshot was 309 passed, 7 skipped, none pending or failing. No code changes, quarantines, issue creation, or manual CI reruns were performed during this testing task.

Summary

Scenario Result
Default helper suppression, including inherited opt-in Passed
Parent logs, HTTP traces, and runtime metrics Passed
Diagnostic replica identity and live helper metrics Passed
Terminal input before restart and after reattachment Passed
Existing CLI attachment surviving restart Did not survive; recorded observation
Dashboard-free terminal and visible workload failure Passed
Standalone opted-in helper without OTLP endpoint Passed

Overall Result

Targeted telemetry behavior verified against the matching PR artifacts. The restart attachment observation prevents claiming uninterrupted terminal continuity. Earlier broader CI failures passed on retry, and the final CI snapshot had no pending or failing checks.

Artifacts and Cleanup

Sanitized evidence is retained with the local testing report: five dashboard PNG screenshots, four terminal SVG screenshots, runtime JSON, assertion output, fixture source, installer logs, and CI logs. Dashboard login URLs, API keys, and raw environment exports are not included in this report.

All test AppHosts, terminal viewers, the standalone helper, and headless browser sessions were stopped. The temporary install/project workspace was removed. The repository remains unchanged and the PR remains a draft.

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.

Approved. I left one non-blocking robustness comment about failing closed when the telemetry opt-in environment variable is malformed. Focused tests and direct OTLP proof otherwise confirmed the intended hidden/visible behavior and per-replica resource identity.

Comment thread src/Aspire.TerminalHost/TerminalHostApp.cs Outdated
Use bool.TryParse so invalid diagnostic configuration leaves telemetry disabled without terminating the terminal host. Cover empty, whitespace, malformed, and numeric values.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 1c676f42-11fe-4ca3-9dba-8beeeca95fca
@github-actions

This comment has been minimized.

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.

Copilot review overview

🟢 Approval recommended

The telemetry gating is consistent across hosting and terminal-host paths and has focused regression coverage.

Review tier: Balanced
Findings: None

Comment thread src/Aspire.TerminalHost/TerminalHostApp.cs Outdated
@github-actions

Copy link
Copy Markdown
Contributor

Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt.

Link IConfigurationExtensions into TerminalHost using the existing non-hosting attribute shim pattern, and use GetBool with a false default. Cover zero and nonzero numeric opt-in values alongside malformed input.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 1c676f42-11fe-4ca3-9dba-8beeeca95fca
@github-actions

Copy link
Copy Markdown
Contributor

Tests selector

56 / 99 PR test projects · 4 PR jobs · 2 advisory-only targets, from 9 changed files.

Selected PR test projects (56 / 99)

Aspire.Cli.EndToEnd.Tests, Aspire.Cli.Tests, Aspire.Dashboard.Components.Tests, Aspire.Dashboard.Tests, Aspire.Hosting.Analyzers.Tests, Aspire.Hosting.Azure.Kubernetes.Tests, Aspire.Hosting.Azure.Kusto.Tests, Aspire.Hosting.Azure.Tests, Aspire.Hosting.Blazor.Tests, Aspire.Hosting.Browsers.Tests, Aspire.Hosting.CodeGeneration.Go.Tests, Aspire.Hosting.CodeGeneration.Java.Tests, Aspire.Hosting.CodeGeneration.Python.Tests, Aspire.Hosting.CodeGeneration.Rust.Tests, Aspire.Hosting.CodeGeneration.TypeScript.Tests, Aspire.Hosting.Containers.Tests, Aspire.Hosting.DevTunnels.Tests, Aspire.Hosting.Docker.Tests, Aspire.Hosting.Dotnet.Tests, Aspire.Hosting.DotnetTool.Tests, Aspire.Hosting.EntityFrameworkCore.Tests, Aspire.Hosting.Foundry.Tests, Aspire.Hosting.Garnet.Tests, Aspire.Hosting.GitHub.Models.Tests, Aspire.Hosting.Go.Tests, Aspire.Hosting.Java.Tests, Aspire.Hosting.JavaScript.Tests, Aspire.Hosting.Kafka.Tests, Aspire.Hosting.Keycloak.Tests, Aspire.Hosting.Kubernetes.Tests, Aspire.Hosting.Maui.Tests, Aspire.Hosting.Milvus.Tests, Aspire.Hosting.MongoDB.Tests, Aspire.Hosting.MySql.Tests, Aspire.Hosting.Nats.Tests, Aspire.Hosting.OpenAI.Tests, Aspire.Hosting.Oracle.Tests, Aspire.Hosting.Orleans.Tests, Aspire.Hosting.PostgreSQL.Tests, Aspire.Hosting.Python.Tests, Aspire.Hosting.Qdrant.Tests, Aspire.Hosting.RabbitMQ.Tests, Aspire.Hosting.Radius.Tests, Aspire.Hosting.Redis.Tests, Aspire.Hosting.RemoteHost.Tests, Aspire.Hosting.Rust.Tests, Aspire.Hosting.Seq.Tests, Aspire.Hosting.SqlServer.Tests, Aspire.Hosting.Testing.Tests, Aspire.Hosting.Tests, Aspire.Hosting.Valkey.Tests, Aspire.Hosting.Yarp.Tests, Aspire.Managed.Tests, Aspire.Playground.Tests, Aspire.Templates.Tests, Aspire.TerminalHost.Tests

Selected PR jobs (4)

cli-starter-validation, extension-e2e, polyglot, typescript-api-compat

Advisory workflow impact (2)

  • Aspire.EndToEnd.Tests (outerloop-only)
  • deployment-e2e (schedule/dispatch-only)

How these were chosen — grouped by what changed

⚠️ 39 of the 57 selected test projects come from a single change — src/Aspire.Hosting/ApplicationModel/TerminalAnnotation.cs.

🔧 src/Aspire.Hosting/ApplicationModel/TerminalAnnotation.cs (changed source)
39 via the project graph

show 39

Aspire.Hosting.Analyzers.Tests (2 hops), Aspire.Hosting.Azure.Kubernetes.Tests (2 hops), Aspire.Hosting.Azure.Kusto.Tests (2 hops), Aspire.Hosting.Azure.Tests, Aspire.Hosting.CodeGeneration.Go.Tests, Aspire.Hosting.CodeGeneration.Java.Tests, Aspire.Hosting.CodeGeneration.Python.Tests, Aspire.Hosting.CodeGeneration.Rust.Tests, Aspire.Hosting.CodeGeneration.TypeScript.Tests, Aspire.Hosting.DevTunnels.Tests (2 hops), Aspire.Hosting.Docker.Tests (2 hops), Aspire.Hosting.DotnetTool.Tests (2 hops), Aspire.Hosting.EntityFrameworkCore.Tests (2 hops), Aspire.Hosting.Foundry.Tests (2 hops), Aspire.Hosting.Garnet.Tests (2 hops), Aspire.Hosting.Go.Tests (2 hops), Aspire.Hosting.Java.Tests (2 hops), Aspire.Hosting.Kafka.Tests (2 hops), Aspire.Hosting.Keycloak.Tests (2 hops), Aspire.Hosting.Kubernetes.Tests (2 hops), Aspire.Hosting.Maui.Tests, Aspire.Hosting.Milvus.Tests (2 hops), Aspire.Hosting.MongoDB.Tests (2 hops), Aspire.Hosting.MySql.Tests (2 hops), Aspire.Hosting.Nats.Tests (2 hops), Aspire.Hosting.Oracle.Tests (2 hops), Aspire.Hosting.Orleans.Tests (2 hops), Aspire.Hosting.PostgreSQL.Tests (2 hops), Aspire.Hosting.Python.Tests (2 hops), Aspire.Hosting.Qdrant.Tests (2 hops), Aspire.Hosting.RabbitMQ.Tests (2 hops), Aspire.Hosting.Redis.Tests (2 hops), Aspire.Hosting.RemoteHost.Tests, Aspire.Hosting.Rust.Tests (2 hops), Aspire.Hosting.Seq.Tests (2 hops), Aspire.Hosting.SqlServer.Tests (2 hops), Aspire.Hosting.Valkey.Tests (2 hops), Aspire.Hosting.Yarp.Tests (2 hops), Aspire.Playground.Tests

🔧 src/Shared/IConfigurationExtensions.cs (changed source)
6 via the project graph: Aspire.Cli.Tests, Aspire.Dashboard.Components.Tests, Aspire.Dashboard.Tests, Aspire.Hosting.GitHub.Models.Tests, Aspire.Hosting.JavaScript.Tests, Aspire.Hosting.OpenAI.Tests

🔧 src/Shared/KnownConfigNames.cs (changed source)
5 via the project graph: Aspire.Hosting.Browsers.Tests, Aspire.Hosting.Containers.Tests, Aspire.Hosting.Testing.Tests, Aspire.Managed.Tests, Aspire.Templates.Tests

🧪 tests/Aspire.Hosting.Tests/WithTerminalTests.cs (changed test)
1 directly: Aspire.Hosting.Tests
3 via the project graph: Aspire.Hosting.Blazor.Tests, Aspire.Hosting.Dotnet.Tests, Aspire.Hosting.Radius.Tests

📦 affected project Aspire.Cli
1 test: Aspire.Cli.EndToEnd.Tests

📦 affected project Aspire.Hosting
1 test: Aspire.EndToEnd.Tests

🧪 tests/Aspire.TerminalHost.Tests/TerminalHostTelemetryTests.cs (changed test)
1 directly: Aspire.TerminalHost.Tests

Job reasons

Job Triggered by
cli-starter-validation affected project Aspire.Cli
deployment-e2e affected project Aspire.Cli
extension-e2e src/Aspire.Hosting/ApplicationModel/TerminalAnnotation.cs, src/Aspire.Hosting/TerminalResourceBuilderExtensions.cs
• affected project Aspire.Hosting
polyglot affected project Aspire.Cli
typescript-api-compat affected project Aspire.Hosting

Selection computed for commit ad937d4.

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.

Copilot review overview

🔵 Needs a closer look

Dashboard-disabled applications currently receive a synthetic OTLP endpoint and start unwanted exporter attempts.

Review tier: Balanced
Findings: None

Previously missed findings (1)

In code that hasn't changed since last review

src/Aspire.Hosting/TerminalResourceBuilderExtensions.cs:229

  • AddOtlpEnvironment does not require an available endpoint: when the dashboard is disabled and neither dashboard OTLP URL is configured, OtlpEndpointResolver falls back to http://localhost:18889. As a result, ShowTerminalHost = true still injects that URL, CreateTelemetryHostBuilder starts telemetry, and every helper attempts to export to a nonexistent collector, contrary to the documented “when an endpoint is available” behavior. Use the optional/skip-if-unavailable registration path (including dynamic dashboard-resource resolution) and cover the dashboard-disabled, no-endpoint case.

@github-actions

Copy link
Copy Markdown
Contributor

Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt.

@mitchdenny
Mitch Denny (mitchdenny) merged commit a6629d4 into main Sep 11, 2026
621 of 626 checks passed
@mitchdenny
Mitch Denny (mitchdenny) deleted the mitchdenny-terminal-host-traces branch September 11, 2026 09:55
@aspire-repo-bot

Copy link
Copy Markdown
Contributor

Pull request created: #1651

Generated by PR Documentation Check · auto · 67.2 AIC · ⌖ 13.9 AIC · ⊞ 18.3K

@aspire-repo-bot

Copy link
Copy Markdown
Contributor

📝 Documentation has been drafted in microsoft/aspire.dev#1651 targeting release/13.6.

Updated the WithTerminal reference page to reflect that terminal-host telemetry is now opt-in, tied to TerminalOptions.ShowTerminalHost.

  • src/frontend/src/content/docs/app-host/with-terminal.mdx:
    • Extended the ShowTerminalHost row in the options table to note it also gates export of the helper resources' diagnostic logs, metrics, and traces (previously it only documented resource-list visibility).
    • Added a new <Aside type="note"> explaining that the hidden terminal-host helpers no longer export telemetry by default, even with an OTLP endpoint configured, and that setting ShowTerminalHost = true both reveals the helpers and enables their diagnostics — independent of the parent resource's own telemetry.

Note

This draft PR needs human review before merging.

@github-actions

Copy link
Copy Markdown
Contributor

⚠️ CI Failure Analysis: Possible Flaky Test(s)

The CI build failed due to test failure(s) that appear unrelated to the PR changes. These may be flaky tests.

Suspected flaky test(s):

  • Aspire.Cli.Tests.Commands.SdkDumpCommandTests.SdkDumpCi_ForHostingProject_DoesNotEmitWarnings in job Tests / No-package tests (regular, Aspire.Cli.Tests, Cli, Cli, tests/Aspire.Cli.Tests/Aspire.Cli.Tests.cs... / Cli (ubuntu-latest)
    • Error: Microsoft.DotNet.RemoteExecutor.RemoteExecutionException : Remote process failed with an unhandled exception.
    • Stack Trace (first frames):
      Child exception:
        Xunit.Sdk.EqualException: Assert.Equal() Failure: Values differ
      Expected: 0
      Actual:   6
         at Aspire.Cli.Tests.Commands.SdkDumpCommandTests.<>c.<<SdkDumpCi_ForHostingProject_DoesNotEmitWarnings>b__18_0>d.MoveNext() in /home/runner/work/aspire/aspire/tests/Aspire.Cli.Tests/Commands/SdkDumpCommandTests.cs:line 280
      
    • Why likely flaky: Test builds Aspire.Hosting.csproj in a remote process and expects zero warnings, but got 6. This is unrelated to the PR's terminal telemetry changes and matches a previously identified recurring flaky pattern (cause cli-sdkdumpcommandtests-doesnotemitwarnings-flaky, issue [CI Failure] Flaky: SdkDumpCommandTests.SdkDumpCi_ForHostingProject_DoesNotEmitWarnings fails because dotnet build of Aspire.Hosting.csproj emits unexpected warnings, unrelated to PR changes #20029, 4 prior occurrences, last seen just hours before this run).

Suggested actions:

  • Re-run the failed CI jobs to confirm if the failure is intermittent
  • If the test continues to fail, consider quarantining it using /quarantine-test <test name> <issue URL>
  • Search existing issues to see if this test is already known to be flaky

You can re-run the failed jobs from the workflow run page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-app-model Issues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants