You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Move Dashboard product usage/error reporting from the IDE telemetry transport to direct Azure Monitor export, and add Azure Monitor log export for CLI product events and errors. Both changes are committed and included in this PR.
Dashboard reporting can now work for CLI-launched, standalone, and deployed dashboards without an IDE debug session or an OpenTelemetry Collector. CLI reported events and errors remain remotely deliverable after the shared recorder switches from activity events to structured logs; CLI operation spans continue to use the existing trace exporter.
The Dashboard and CLI use separate built-in Application Insights destinations. The CLI destination is unchanged. No dependency version changes are required.
Implementation
Share activity/event/error recording through AspireTelemetryBase and exporter configuration through AspireTelemetryExporter, while retaining product-specific instrumentation, enablement, metadata, and privacy policies.
Use AzureMonitorTelemetryProvider to configure and own Azure Monitor trace/log providers and private logging services. Each product manager creates the isolated pipeline after checking consent, attaches its event logger, detaches it before shutdown, and flushes/shuts down traces and logs concurrently.
Record product events at Information level through private loggers in Aspire.Cli.Reported.Events or Aspire.Dashboard.Reported.Events, respectively. Ordinary application/framework logs are excluded by logger-factory isolation, not by product-specific category or level filters at the logger-provider or batch-processor boundaries. Scopes are excluded.
Record usage events and errors immediately as Information-level structured logs, with the event name as the message and microsoft.operation_name. Azure Monitor stores these exception-free log records in traces / AppTraces. They do not create fallback spans or attach activity events, and use ambient trace/span correlation only when available.
Apply Dashboard privacy filtering and scalar string bounds before recording; collection values are excluded. CLI events retain the CLI's existing internally supplied metadata and exception-detail policy. CLI string collections use string.Join(",") for log attributes; activity tags retain typed values.
Keep CLI diagnostic/profiling OTLP providers and Dashboard diagnostic OTLP tracing separate from product export. Ordinary CLI file/console logging remains available after product-provider shutdown; its independent OpenTelemetry logging registration does not configure a log exporter.
Use aspire-dashboard and aspire-cli as the product resource names for both Azure Monitor traces and logs. Resource versions use AssemblyVersionHelper.GetInformationalVersion, including build metadata when present. Resource names identify logical roles; the connection strings select the destination Application Insights resources.
Separate Dashboard configuration, instrumentation, and hosted provider lifecycle into DashboardTelemetryConfiguration, DashboardTelemetryService, and DashboardTelemetryManager. Provider initialization failures produce a local warning and allow Dashboard startup without product export.
Keep Dashboard resource commands activity-based, assigning their result and ending the activity before the UI recovery delay.
Remove the Dashboard sender interface, HTTP transport/serialization contracts, operation wrappers, and IDE-specific telemetry types. Preserve the VS Code extension's legacy HTTP endpoints for older dashboards.
Document the current shared product pipeline, privacy, lifecycle, and agent usage reporting in Aspire product telemetry, separate from application observability.
User-facing usage
Dashboard reporting is independent of IDE telemetry preferences. To opt out for everyone accessing a Dashboard, set this before starting the AppHost or Dashboard process:
$env:ASPIRE_DASHBOARD_TELEMETRY_OPTOUT='true'
The value 1 is also supported. Direct and AppHost-forwarded opt-outs are combined so either can disable reporting. The Dashboard settings notice reflects resolved enablement.
CLI product traces and logs both honor ASPIRE_CLI_TELEMETRY_OPTOUT=true or 1 and command selection. Help/version informational invocations and completion do not enable reported export. Product opt-out does not disable separately configured diagnostic/profiling OTLP export.
Breaking changes
Dashboard product telemetry no longer uses IDE telemetry consent or requires an IDE debug session. Deployments and users that relied on IDE settings to disable Dashboard reporting must use ASPIRE_DASHBOARD_TELEMETRY_OPTOUT instead. Removed Dashboard sender/operation contracts are implementation types, not hosting/client integration APIs. Legacy extension endpoints remain compatible with older dashboards.
For the CLI, reported usage/error details now travel as structured logs rather than activity events. Consumers querying those details should use traces / AppTraces; operation spans remain available.
Security considerations
This introduces direct outbound Dashboard Azure Monitor reporting and adds remote CLI reported-log export to the existing CLI product-telemetry destination. The isolated product pipelines do not forward application telemetry received by the Dashboard, ordinary logs, or ambient log scopes.
Dashboard properties exclude exception messages/stacks, raw browser user agents, resource names, unknown keys, and PII-classified fields. Scalar strings are truncated to at most 1,024 characters, and collection values are excluded before serialization. CLI product logs retain internally supplied tags and exception type/message/stack details; they do not apply the Dashboard allowlist and are not described as wholly anonymous.
Azure SDK storage is rooted in the user's profile, independent of ASPIRE_HOME: .aspire/dashboard/telemetrystorage and .aspire/cli/telemetrystorage. Each product configures its trace and log exporters with the same storage directory; Azure Monitor exporter 1.9 shares a transmitter and storage for exporters using the same connection string. No separate logs child directory is configured. Storage and delivery are best effort; successful SDK flush/shutdown is not proof of ingestion.
A security review has not been performed.
Validation
Latest follow-up: all 702 eligible Dashboard component tests passed on 2026-10-07 against the source pushed in 65b8e37d759a5e85e97ad806e0fd9d2e53537667. The component project rebuilt successfully. The obsolete resource-inventory test was replaced with selected-view tests for Graph and Parameters, covering scalar Resource.View properties, the complete sanitized log attributes, ambient correlation, and suppression of unchanged-property events.
The following command ran the full eligible suite using the freshly built output; it passed with zero failures or skipped tests:
Earlier focused validation on 2026-10-07 at 8ae309a40ea318b78d6c39fdce46a26e68528d33 produced the results below. These runs predate the latest follow-up commits and are not exact-head validation. The commands rebuilt the relevant projects with MSBUILDTERMINALLOGGER=false and excluded quarantined/outerloop tests.
Passed: 52 CLI tests at that earlier revision. Covers reported-log consent, application-logger isolation and emitted category/level, actual Azure Monitor log envelopes, comma-joined collection serialization, resource identity, provider lifecycle, and local logging after product shutdown/disposal.
Passed: 105 focused Dashboard tests at that earlier revision. Covers shared recording/export, Dashboard telemetry, resource commands, and health. The updated tests verify that unknown event-result enum values are recorded as strings and that the trace/log resources share the generated instance ID, standard Dashboard name, and full informational version.
An earlier CI run also passed the Dashboard test jobs on Linux and Windows, and the Dashboard component test jobs on Linux and Windows. Those results predate the latest follow-up commits.
That earlier run also reported failures in Hosting.Blazor (Windows) and VS Code extension unit tests (Windows). Those failures were not investigated in the earlier validation-description update. Current-head CI has not yet been validated after the latest push.
Payload tests use in-process HTTP handlers; synthetic records do not reach Azure. Live Azure ingestion, Native AOT publishing, and full suites outside the Dashboard component project were not run in this follow-up.
Related issue: none.
Checklist
Is this feature complete?
Yes. Ready to ship.
No. Follow-up changes expected.
Dashboard component build and tests now pass locally; current-head CI validation and security review are still pending before marking the PR ready to ship.
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?
The reason will be displayed to describe this comment to others. Learn more.
Found two issues: one product-log filtering/privacy issue and one resource-type metadata regression. The resource-type regression is already covered by an existing inline comment, so this review adds only the filtering finding.
The documented 1 opt-out only works when this key is read inside the dashboard process. When it is set before starting an AppHost, src/Aspire.Hosting/Dashboard/DashboardOptions.cs:52 still uses bool.TryParse, so 1 becomes null and DashboardEventHandlers.cs:575-577 does not forward the opt-out. Update the AppHost-side parser to accept numeric booleans and add coverage for forwarding 1; otherwise the advertised AppHost opt-out can silently leave telemetry enabled.
The PR description says exact product-category and Information-through-Critical filtering is enforced at both logger-provider and batch-processor boundaries, but this isolated factory registers the OpenTelemetry provider without either filter, and AddAspireAzureMonitorExporter installs an unfiltered batch processor. The new product-telemetry spec instead documents isolation as the only boundary. Please either implement the claimed defense-in-depth filters or correct the PR description/security and validation claims to match the code.
Selects the full PR test matrix + all PR-gated jobs (ALL) — run-all fallback: 'tests/Shared/TestDashboardTelemetrySender.cs' is neither Layer-1-owned nor matched by a Layer 2 rule
The normal shutdown path calls Shutdown on the profiling and diagnostic providers but never disposes them. After TryShutdownAsync sets the state to ShuttingDown, the later Dispose() call returns through its non-Initialized branch, so these providers and their processors/exporters remain undisposed. Dispose both captured providers in a finally block after the concurrent shutdown operations.
Update Dashboard documentation for structured logs and command activities
This describes the current Dashboard as activity-based, but this PR moves usage and error events to structured logs and retains activities only for commands. That stale wording can mislead future compatibility maintenance; describe it as the current direct Azure Monitor implementation instead.
🧠 Review effort: Balanced
Give feedback about Copilot approvals in this survey to enter a drawing for a $150 gift card.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Move Dashboard product usage/error reporting from the IDE telemetry transport to direct Azure Monitor export, and add Azure Monitor log export for CLI product events and errors. Both changes are committed and included in this PR.
Dashboard reporting can now work for CLI-launched, standalone, and deployed dashboards without an IDE debug session or an OpenTelemetry Collector. CLI reported events and errors remain remotely deliverable after the shared recorder switches from activity events to structured logs; CLI operation spans continue to use the existing trace exporter.
The Dashboard and CLI use separate built-in Application Insights destinations. The CLI destination is unchanged. No dependency version changes are required.
Implementation
AspireTelemetryBaseand exporter configuration throughAspireTelemetryExporter, while retaining product-specific instrumentation, enablement, metadata, and privacy policies.AzureMonitorTelemetryProviderto configure and own Azure Monitor trace/log providers and private logging services. Each product manager creates the isolated pipeline after checking consent, attaches its event logger, detaches it before shutdown, and flushes/shuts down traces and logs concurrently.Aspire.Cli.Reported.EventsorAspire.Dashboard.Reported.Events, respectively. Ordinary application/framework logs are excluded by logger-factory isolation, not by product-specific category or level filters at the logger-provider or batch-processor boundaries. Scopes are excluded.microsoft.operation_name. Azure Monitor stores these exception-free log records intraces/AppTraces. They do not create fallback spans or attach activity events, and use ambient trace/span correlation only when available.string.Join(",")for log attributes; activity tags retain typed values.aspire-dashboardandaspire-clias the product resource names for both Azure Monitor traces and logs. Resource versions useAssemblyVersionHelper.GetInformationalVersion, including build metadata when present. Resource names identify logical roles; the connection strings select the destination Application Insights resources.DashboardTelemetryConfiguration,DashboardTelemetryService, andDashboardTelemetryManager. Provider initialization failures produce a local warning and allow Dashboard startup without product export.User-facing usage
Dashboard reporting is independent of IDE telemetry preferences. To opt out for everyone accessing a Dashboard, set this before starting the AppHost or Dashboard process:
The value
1is also supported. Direct and AppHost-forwarded opt-outs are combined so either can disable reporting. The Dashboard settings notice reflects resolved enablement.CLI product traces and logs both honor
ASPIRE_CLI_TELEMETRY_OPTOUT=trueor1and command selection. Help/version informational invocations and completion do not enable reported export. Product opt-out does not disable separately configured diagnostic/profiling OTLP export.Breaking changes
Dashboard product telemetry no longer uses IDE telemetry consent or requires an IDE debug session. Deployments and users that relied on IDE settings to disable Dashboard reporting must use
ASPIRE_DASHBOARD_TELEMETRY_OPTOUTinstead. Removed Dashboard sender/operation contracts are implementation types, not hosting/client integration APIs. Legacy extension endpoints remain compatible with older dashboards.For the CLI, reported usage/error details now travel as structured logs rather than activity events. Consumers querying those details should use
traces/AppTraces; operation spans remain available.Security considerations
This introduces direct outbound Dashboard Azure Monitor reporting and adds remote CLI reported-log export to the existing CLI product-telemetry destination. The isolated product pipelines do not forward application telemetry received by the Dashboard, ordinary logs, or ambient log scopes.
Dashboard properties exclude exception messages/stacks, raw browser user agents, resource names, unknown keys, and PII-classified fields. Scalar strings are truncated to at most 1,024 characters, and collection values are excluded before serialization. CLI product logs retain internally supplied tags and exception type/message/stack details; they do not apply the Dashboard allowlist and are not described as wholly anonymous.
Azure SDK storage is rooted in the user's profile, independent of
ASPIRE_HOME:.aspire/dashboard/telemetrystorageand.aspire/cli/telemetrystorage. Each product configures its trace and log exporters with the same storage directory; Azure Monitor exporter 1.9 shares a transmitter and storage for exporters using the same connection string. No separatelogschild directory is configured. Storage and delivery are best effort; successful SDK flush/shutdown is not proof of ingestion.A security review has not been performed.
Validation
Latest follow-up: all 702 eligible Dashboard component tests passed on 2026-10-07 against the source pushed in
65b8e37d759a5e85e97ad806e0fd9d2e53537667. The component project rebuilt successfully. The obsolete resource-inventory test was replaced with selected-view tests for Graph and Parameters, covering scalarResource.Viewproperties, the complete sanitized log attributes, ambient correlation, and suppression of unchanged-property events.The following command ran the full eligible suite using the freshly built output; it passed with zero failures or skipped tests:
Earlier focused validation on 2026-10-07 at
8ae309a40ea318b78d6c39fdce46a26e68528d33produced the results below. These runs predate the latest follow-up commits and are not exact-head validation. The commands rebuilt the relevant projects withMSBUILDTERMINALLOGGER=falseand excluded quarantined/outerloop tests.Passed: 52 CLI tests at that earlier revision. Covers reported-log consent, application-logger isolation and emitted category/level, actual Azure Monitor log envelopes, comma-joined collection serialization, resource identity, provider lifecycle, and local logging after product shutdown/disposal.
Passed: 105 focused Dashboard tests at that earlier revision. Covers shared recording/export, Dashboard telemetry, resource commands, and health. The updated tests verify that unknown event-result enum values are recorded as strings and that the trace/log resources share the generated instance ID, standard Dashboard name, and full informational version.
Passed: whitespace validation.
git diff --checkAn earlier CI run also passed the Dashboard test jobs on Linux and Windows, and the Dashboard component test jobs on Linux and Windows. Those results predate the latest follow-up commits.
That earlier run also reported failures in Hosting.Blazor (Windows) and VS Code extension unit tests (Windows). Those failures were not investigated in the earlier validation-description update. Current-head CI has not yet been validated after the latest push.
Payload tests use in-process HTTP handlers; synthetic records do not reach Azure. Live Azure ingestion, Native AOT publishing, and full suites outside the Dashboard component project were not run in this follow-up.
Related issue: none.
Checklist
<remarks />and<code />elements on your triple slash comments?