Skip to content

Aggregate and send build/tasks/msbuild-subclassed telemetry in MSBuildLogger#55054

Open
AR-May wants to merge 1 commit into
dotnet:mainfrom
AR-May:add-msbuild-subclassed-telemetry
Open

Aggregate and send build/tasks/msbuild-subclassed telemetry in MSBuildLogger#55054
AR-May wants to merge 1 commit into
dotnet:mainfrom
AR-May:add-msbuild-subclassed-telemetry

Conversation

@AR-May

@AR-May AR-May commented Jun 29, 2026

Copy link
Copy Markdown
Member

MSBuild's ProjectTelemetry now logs a third aggregated event, build/tasks/msbuild-subclassed, tracking user-authored subclasses of Microsoft-owned tasks. The SDK MSBuildLogger only routed build/tasks/taskfactory and build/tasks through aggregation; the new event was silently dropped.

Wire up the new event name so it is aggregated and emitted on build finished, refactoring the per-event send into a shared helper.

…dLogger

MSBuild's ProjectTelemetry now logs a third aggregated event, build/tasks/msbuild-subclassed, tracking user-authored subclasses of Microsoft-owned tasks. The SDK MSBuildLogger only routed build/tasks/taskfactory and build/tasks through aggregation; the new event fell through to FormatAndSend and was silently dropped.

Wire up the new event name so it is aggregated and emitted on build finished, refactoring the per-event send into a shared helper. Extend ItAggregatesEvents to cover the new event.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings June 29, 2026 16:07

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 the .NET SDK MSBuildLogger telemetry aggregation to include MSBuild’s newly introduced aggregated event build/tasks/msbuild-subclassed, ensuring it’s not silently dropped and is emitted on build completion alongside the existing aggregated task events.

Changes:

  • Added support for aggregating and emitting build/tasks/msbuild-subclassed telemetry on build finished.
  • Refactored build-finished emission logic to use a shared SendAggregatedEvent helper for per-event sending/removal.
  • Extended the existing aggregation unit test to cover the new aggregated event and validate summation behavior.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
test/dotnet.Tests/CommandTests/MSBuild/GivenMSBuildLogger.cs Extends aggregation test to include the new msbuild-subclassed aggregated telemetry and validates merged counts.
src/Cli/dotnet/Commands/MSBuild/MSBuildLogger.cs Adds the new aggregated event name, routes it through aggregation, and sends it at build finished via a shared helper.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants