Repository navigation
Disable dashboard telemetry in Docker and Kubernetes deployments - #20906
James Newton-King (JamesNK) wants to merge 1 commit into
Conversation
Opt out dashboard containers in Docker Compose and Kubernetes output, share the telemetry configuration key, and update documentation and snapshot coverage. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 20906Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 20906" |
Tests selector56 / 98 PR test projects · 7 PR jobs, from 69 changed files. Selected PR test projects (56 / 98)
Selected PR jobs (7)
How these were chosen — grouped by what changed
🔧 show 34
🔧 🔧 🔧 🔧 📦 affected project 📦 affected project 📦 affected project 🔧 🔧 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 Job reasons
Selection computed for commit |
There was a problem hiding this comment.
🟢 Approval recommended
The shared configuration key, deployment defaults, documentation, and generated-artifact coverage are consistent across the affected components.
0 open findings
What changed in this PR
This PR disables dashboard product telemetry by default in Docker Compose and Kubernetes artifact publishers while preserving application OpenTelemetry ingestion.
Changes:
- Centralizes the telemetry opt-out configuration key.
- Adds the opt-out to generated Compose and Helm dashboard containers.
- Updates documentation and snapshot coverage, including multi-environment charts.
| File | Description |
|---|---|
src/Shared/KnownConfigNames.cs |
Adds shared opt-out key. |
src/Aspire.Hosting/Dashboard/DashboardOptions.cs |
Uses the shared key. |
src/Aspire.Dashboard/Telemetry/DashboardTelemetryService.cs |
Removes duplicate key. |
src/Aspire.Dashboard/Telemetry/DashboardTelemetryConfiguration.cs |
Uses the shared key. |
src/Aspire.Hosting.Docker/Aspire.Hosting.Docker.csproj |
Links shared configuration names. |
src/Aspire.Hosting.Docker/DockerComposeAspireDashboardResourceBuilderExtensions.cs |
Sets the Compose dashboard default. |
src/Aspire.Hosting.Docker/README.md |
Documents the default. |
src/Aspire.Hosting.Kubernetes/Aspire.Hosting.Kubernetes.csproj |
Links shared configuration names. |
src/Aspire.Hosting.Kubernetes/KubernetesAspireDashboardResourceBuilderExtensions.cs |
Sets the Kubernetes dashboard default. |
src/Aspire.Hosting.Kubernetes/README.md |
Documents the default. |
tests/Aspire.Dashboard.Tests/Telemetry/DashboardTelemetryConfigurationTests.cs |
Uses the shared key in telemetry tests. |
tests/Aspire.Dashboard.Tests/Integration/StartupTests.cs |
Uses the shared key in startup tests. |
tests/Aspire.Dashboard.Tests/Integration/Playwright/Infrastructure/DashboardServerFixture.cs |
Updates Playwright configuration. |
tests/Aspire.Dashboard.Tests/Integration/IntegrationTestHelpers.cs |
Updates dashboard test setup. |
tests/Aspire.Hosting.Kubernetes.Tests/KubernetesPublisherTests.cs |
Verifies the dashboard ConfigMap output. |
tests/Aspire.Hosting.Kubernetes.Tests/Snapshots/KubernetesPublisherTests.PublishAsync_WithPersistentVolumeEnvironment_OnContainerAndExecutable#06.verified.yaml |
Updates Helm values. |
tests/Aspire.Hosting.Kubernetes.Tests/Snapshots/KubernetesPublisherTests.PublishAsync_WithFirstClassPersistentVolume_EnvironmentUsesDeploymentMountPath#03.verified.yaml |
Updates Helm values. |
tests/Aspire.Hosting.Kubernetes.Tests/Snapshots/KubernetesPublisherTests.PublishAsync_SharedEmbeddedParameterIsScopedPerResource#00.verified.yaml |
Updates Helm values. |
tests/Aspire.Hosting.Kubernetes.Tests/Snapshots/KubernetesPublisherTests.PublishAsync_ResourceWithProbes#00.verified.yaml |
Adds ConfigMap reference. |
tests/Aspire.Hosting.Kubernetes.Tests/Snapshots/KubernetesPublisherTests.PublishAsync_ProjectAndExecutableVolumesUseDefaultStorageAndEnvironmentPaths#04.verified.yaml |
Updates Helm values. |
tests/Aspire.Hosting.Kubernetes.Tests/Snapshots/KubernetesPublisherTests.PublishAsync_HandlesSpecialResourceName#02.verified.yaml |
Adds ConfigMap reference. |
tests/Aspire.Hosting.Kubernetes.Tests/Snapshots/KubernetesPublisherTests.PublishAsync_HandlesSpecialResourceName#01.verified.yaml |
Updates Helm values. |
tests/Aspire.Hosting.Kubernetes.Tests/Snapshots/KubernetesPublisherTests.PublishAsync_HandlesScalarEnvironmentVariableTypes#01.verified.yaml |
Updates Helm values. |
tests/Aspire.Hosting.Kubernetes.Tests/Snapshots/KubernetesPublisherTests.PublishAsync_HandlesConditionalReferenceExpressionWithParameterCondition#02.verified.yaml |
Adds ConfigMap reference. |
tests/Aspire.Hosting.Kubernetes.Tests/Snapshots/KubernetesPublisherTests.PublishAsync_HandlesConditionalReferenceExpressionWithParameterCondition#01.verified.yaml |
Updates Helm values. |
tests/Aspire.Hosting.Kubernetes.Tests/Snapshots/KubernetesPublisherTests.PublishAsync_HandlesConditionalReferenceExpression#02.verified.yaml |
Adds ConfigMap reference. |
tests/Aspire.Hosting.Kubernetes.Tests/Snapshots/KubernetesPublisherTests.PublishAsync_HandlesConditionalReferenceExpression#01.verified.yaml |
Updates Helm values. |
tests/Aspire.Hosting.Kubernetes.Tests/Snapshots/KubernetesPublisherTests.PublishAsync_GeneratesValidHelmChart#10.verified.yaml |
Adds dashboard ConfigMap snapshot. |
tests/Aspire.Hosting.Kubernetes.Tests/Snapshots/KubernetesPublisherTests.PublishAsync_GeneratesValidHelmChart#02.verified.yaml |
Adds ConfigMap reference. |
tests/Aspire.Hosting.Kubernetes.Tests/Snapshots/KubernetesPublisherTests.PublishAsync_GeneratesValidHelmChart#01.verified.yaml |
Updates Helm values. |
tests/Aspire.Hosting.Kubernetes.Tests/Snapshots/KubernetesPublisherTests.PublishAsync_EmbeddedParametersInEnvironmentExpressionsPopulateValues#00.verified.yaml |
Updates Helm values. |
tests/Aspire.Hosting.Kubernetes.Tests/Snapshots/KubernetesPublisherTests.PublishAsync_CustomWorkloadAndResourceType#02.verified.yaml |
Adds ConfigMap reference. |
tests/Aspire.Hosting.Kubernetes.Tests/Snapshots/KubernetesPublisherTests.PublishAsync_CustomWorkloadAndResourceType#01.verified.yaml |
Updates Helm values. |
tests/Aspire.Hosting.Kubernetes.Tests/Snapshots/KubernetesPublisherTests.PublishAsync_ConditionalWithParameterBranch_UsesIfElseSyntax#02.verified.yaml |
Adds ConfigMap reference. |
tests/Aspire.Hosting.Kubernetes.Tests/Snapshots/KubernetesPublisherTests.PublishAsync_ConditionalWithParameterBranch_UsesIfElseSyntax#01.verified.yaml |
Updates Helm values. |
tests/Aspire.Hosting.Kubernetes.Tests/Snapshots/KubernetesPublisherTests.PublishAsync_ConditionalBranchesCaptureEmbeddedParameters#00.verified.yaml |
Updates Helm values. |
tests/Aspire.Hosting.Kubernetes.Tests/Snapshots/KubernetesPublisherTests.PublishAsync_CompositeExpressionPreservesExpressionShape#00.verified.yaml |
Updates Helm values. |
tests/Aspire.Hosting.Kubernetes.Tests/Snapshots/KubernetesPublisherTests.KubernetesWithProjectResources#02.verified.yaml |
Adds ConfigMap reference. |
tests/Aspire.Hosting.Kubernetes.Tests/Snapshots/KubernetesPublisherTests.KubernetesWithProjectResources#01.verified.yaml |
Updates Helm values. |
tests/Aspire.Hosting.Kubernetes.Tests/Snapshots/KubernetesPublisherTests.KubernetesWithDotnetProjectUsesImageParameterAndProjectEndpoint#01.verified.yaml |
Updates Helm values. |
tests/Aspire.Hosting.Kubernetes.Tests/Snapshots/KubernetesPublisherTests.KubernetesMapsPortsForBaitAndSwitchResources#02.verified.yaml |
Adds ConfigMap reference. |
tests/Aspire.Hosting.Kubernetes.Tests/Snapshots/KubernetesPublisherTests.KubernetesMapsPortsForBaitAndSwitchResources#01.verified.yaml |
Updates Helm values. |
tests/Aspire.Hosting.Kubernetes.Tests/Snapshots/KubernetesPublisherTests.KubernetesEndpointReferenceUsesServicePortNotTargetPort#00.verified.yaml |
Updates named-environment values. |
tests/Aspire.Hosting.Kubernetes.Tests/Snapshots/KubernetesEnvironmentResourceTests.PublishingKubernetesEnvironmentPublishesFile#01.verified.yaml |
Adds default dashboard configuration. |
tests/Aspire.Hosting.Kubernetes.Tests/Snapshots/KubernetesEnvironmentResourceTests.MultipleKubernetesEnvironmentsSupported/env2/values.verified.yaml |
Updates env2 values. |
tests/Aspire.Hosting.Kubernetes.Tests/Snapshots/KubernetesEnvironmentResourceTests.MultipleKubernetesEnvironmentsSupported/env2/templates/env2-dashboard/deployment.verified.yaml |
Adds env2 ConfigMap reference. |
tests/Aspire.Hosting.Kubernetes.Tests/Snapshots/KubernetesEnvironmentResourceTests.MultipleKubernetesEnvironmentsSupported/env2/templates/env2-dashboard/config.verified.yaml |
Adds env2 ConfigMap. |
tests/Aspire.Hosting.Kubernetes.Tests/Snapshots/KubernetesEnvironmentResourceTests.MultipleKubernetesEnvironmentsSupported/env1/values.verified.yaml |
Updates env1 values. |
tests/Aspire.Hosting.Kubernetes.Tests/Snapshots/KubernetesEnvironmentResourceTests.MultipleKubernetesEnvironmentsSupported/env1/templates/env1-dashboard/deployment.verified.yaml |
Adds env1 ConfigMap reference. |
tests/Aspire.Hosting.Kubernetes.Tests/Snapshots/KubernetesEnvironmentResourceTests.MultipleKubernetesEnvironmentsSupported/env1/templates/env1-dashboard/config.verified.yaml |
Adds env1 ConfigMap. |
tests/Aspire.Hosting.Kubernetes.Tests/Snapshots/KubernetesDeployTests.DeferredValueProvider_EndToEnd_PublishAndResolve#00.verified.yaml |
Updates Helm values. |
tests/Aspire.Hosting.Kubernetes.Tests/Snapshots/KubernetesDeployTests.Dashboard_HonorsRequiredOtlpProtocol_protocol=HttpProtobuf.verified.yaml |
Updates HTTP/protobuf values. |
tests/Aspire.Hosting.Kubernetes.Tests/Snapshots/KubernetesDeployTests.Dashboard_HonorsRequiredOtlpProtocol_protocol=HttpJson.verified.yaml |
Updates HTTP/JSON values. |
tests/Aspire.Hosting.Kubernetes.Tests/Snapshots/KubernetesDeployTests.Dashboard_HonorsRequiredOtlpProtocol_protocol=Grpc.verified.yaml |
Updates gRPC values. |
tests/Aspire.Hosting.Docker.Tests/Snapshots/DockerComposeTests.MultipleDockerComposeEnvironmentsSupported/env2/docker-compose.verified.yaml |
Adds env2 Compose opt-out. |
tests/Aspire.Hosting.Docker.Tests/Snapshots/DockerComposeTests.MultipleDockerComposeEnvironmentsSupported/env1/docker-compose.verified.yaml |
Adds env1 Compose opt-out. |
tests/Aspire.Hosting.Docker.Tests/Snapshots/DockerComposeTests.DockerSwarmUpdateConfigSerializedCorrectly.verified.yaml |
Updates Swarm snapshot. |
tests/Aspire.Hosting.Docker.Tests/Snapshots/DockerComposeTests.DockerSwarmDeploymentLabelsSerializedCorrectly.verified.yaml |
Updates Swarm snapshot. |
tests/Aspire.Hosting.Docker.Tests/Snapshots/DockerComposeTests.DockerComposeOnlyExposesExternalEndpoints.verified.yaml |
Updates endpoint snapshot. |
tests/Aspire.Hosting.Docker.Tests/Snapshots/DockerComposeTests.DashboardWithForwardedHeadersWritesEnvVar.verified.yaml |
Preserves forwarded-header configuration. |
tests/Aspire.Hosting.Docker.Tests/Snapshots/DockerComposePublisherTests.PublishAsync_WithDashboardEnabled_IncludesDashboardService.verified.yaml |
Verifies default opt-out. |
tests/Aspire.Hosting.Docker.Tests/Snapshots/DockerComposePublisherTests.PublishAsync_WithDashboard_UsesCustomConfiguration.verified.yaml |
Preserves custom dashboard settings. |
tests/Aspire.Hosting.Docker.Tests/Snapshots/DockerComposePublisherTests.PublishAsync_WithDashboard_HonorsRequiredOtlpProtocols.verified.yaml |
Updates OTLP snapshot. |
tests/Aspire.Hosting.Docker.Tests/Snapshots/DockerComposePublisherTests.PublishAsync_MultipleResourcesWithOtlp_ConfiguresAllForDashboard.verified.yaml |
Updates multi-resource snapshot. |
tests/Aspire.Hosting.Docker.Tests/Snapshots/DockerComposePublisherTests.PublishAsync_HandlesConditionalReferenceExpressionWithParameterCondition.verified.yaml |
Updates conditional snapshot. |
tests/Aspire.Hosting.Docker.Tests/Snapshots/DockerComposePublisherTests.PublishAsync_HandlesConditionalReferenceExpression.verified.yaml |
Updates conditional snapshot. |
tests/Aspire.Hosting.Docker.Tests/Snapshots/DockerComposePublisherTests.PublishAsync_GeneratesValidDockerComposeFile.verified.yaml |
Updates primary Compose snapshot. |
tests/Aspire.Hosting.Docker.Tests/Snapshots/DockerComposePublisherTests.PrepareStep_ResolvesArbitraryIValueProviderSource.verified.yaml |
Updates provider snapshot. |
tests/Aspire.Hosting.Docker.Tests/Snapshots/DockerComposePublisherTests.DockerComposeWithProjectResources.verified.yaml |
Updates project snapshot. |
tests/Aspire.Hosting.Docker.Tests/Snapshots/DockerComposePublisherTests.DockerComposeCorrectlyEmitsPortMappings.verified.yaml |
Updates port snapshot. |
tests/Aspire.Hosting.Docker.Tests/Snapshots/DockerComposePublisherTests.DockerComposeAppliesServiceCustomizations.verified.yaml |
Updates customization snapshot. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
Description
Dashboards included in published Docker Compose files and Kubernetes Helm charts should not report dashboard product usage and errors by default. Set
ASPIRE_DASHBOARD_TELEMETRY_OPTOUT=trueon both generated dashboard containers.This only opts out of the dashboard's own usage/error reporting. Application OpenTelemetry ingestion and local AppHost dashboard telemetry behavior are unchanged.
KnownConfigNames.DashboardTelemetryOptOutconstant.No new dependencies or public APIs are introduced. Azure Container Apps and Azure App Service provision platform-managed dashboards and are not changed by this PR.
User-facing usage
Existing deployment environment configuration automatically applies the opt-out:
C#
TypeScript
The generated Compose dashboard service now includes:
Kubernetes emits the same setting through the dashboard ConfigMap and references that ConfigMap from the dashboard Deployment.
Validation
The repository was restored with
.\restore.cmd— passed. The following targeted commands compiled the affected projects and verified configuration parsing, AppHost forwarding, dashboard startup, and generated deployment output:dotnet test --project .\tests\Aspire.Dashboard.Tests\Aspire.Dashboard.Tests.csproj --no-launch-profile -- --filter-method '*.DashboardTelemetryConfigurationTests.*' --filter-method '*.DashboardTelemetryServiceTests.*' --filter-method '*.Configuration_LegacyDebugSession_DisablesTelemetryAndIgnoresTransportSettings' --filter-method '*.Startup_HttpJsonWithoutReflection_UsesGeneratedMetadata' --filter-not-trait 'quarantined=true' --filter-not-trait 'outerloop=true'— passed, 32 tests.dotnet test --project .\tests\Aspire.Hosting.Tests\Aspire.Hosting.Tests.csproj --no-launch-profile -- --filter-class '*.DashboardOptionsTests' --filter-class '*.DashboardEventHandlersTests' --filter-not-trait 'quarantined=true' --filter-not-trait 'outerloop=true'— passed, 59 tests.dotnet test --project .\tests\Aspire.Hosting.Docker.Tests\Aspire.Hosting.Docker.Tests.csproj --no-launch-profile -- --filter-method '*.PublishAsync_WithDashboardEnabled_IncludesDashboardService' --filter-method '*.PublishAsync_WithDashboard_UsesCustomConfiguration' --filter-method '*.PublishAsync_InRunMode_DoesNotCreateDashboard' --filter-method '*.DashboardWithForwardedHeadersWritesEnvVar' --filter-not-trait 'quarantined=true' --filter-not-trait 'outerloop=true'— passed, 4 tests.dotnet test --project .\tests\Aspire.Hosting.Kubernetes.Tests\Aspire.Hosting.Kubernetes.Tests.csproj --no-build --no-launch-profile -- --filter-method '*.PublishAsync_GeneratesValidHelmChart' --filter-method '*.Dashboard_HonorsRequiredOtlpProtocol' --filter-method '*.AddKubernetesEnvironment_CreatesDashboardByDefault' --filter-not-trait 'quarantined=true' --filter-not-trait 'outerloop=true'— passed, 5 tests after building the project in the same session. Existing CRLF baselines were temporarily normalized to LF for Verify and their original checkout line endings were restored afterward.git -c core.safecrlf=false --no-pager diff --check— passed.No live Docker or Kubernetes deployment was performed.
Fixes # (issue)
Checklist
<remarks />and<code />elements on your triple slash comments?