Add multithreaded mode information to build telemetry#12508
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR adds telemetry tracking for multithreaded mode in MSBuild builds. The change allows MSBuild to report whether multithreaded mode was enabled during a build, providing valuable data for understanding build configurations and performance patterns.
- Adds a new
MultiThreadedModeEnabledproperty to theBuildTelemetryclass - Updates the
BuildManagerto capture the multithreaded mode state from build parameters - Includes comprehensive test coverage for the new telemetry property
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/Framework/Telemetry/BuildTelemetry.cs | Adds MultiThreadedModeEnabled property and integrates it into telemetry collection methods |
| src/Build/BackEnd/BuildManager/BuildManager.cs | Sets the multithreaded mode telemetry value from build parameters |
| src/Build.UnitTests/BackEnd/KnownTelemetry_Tests.cs | Updates tests to verify the new telemetry property behavior |
JanProvaznik
left a comment
There was a problem hiding this comment.
lgtm, then https://github.com/dotnet/sdk/blob/main/src/Cli/dotnet/Commands/MSBuild/MSBuildLogger.cs
needs update to send it to sdk telemetry backend
Do we need any update in SDK when we add properties to the existing event? I see that fields that needs some processing like hashing need some changes, but this one probably does not need. I will though need it for the next PR with task factories stats, so thanks for mentioning this. |
|
you're probably right that this gets picked up without changes |
|
ah I now remembered, pls update https://github.com/dotnet/msbuild/blob/c9e83a9059f5bf140678d2dd3735b1d5001a45df/documentation/wiki/CollectedTelemetry.md when you have the events figured out @AR-May |
|
We'll need to update SDK's GDPR classification for the new property on the existing event, yes - but that happens in the GDPR classification tool, not in the SDK repo. When we get the TaskFactory-level data, depending on how/where that data is sent through telemetry we might need to allowlist the new event in the SDK repo. |
Just a quick change to sync this now that #12508 is merged. --------- Co-authored-by: Copilot <[email protected]>
Partially fixes #12507
Adding basic telemetry for multithreaded MSBuild: