-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Brief doc on feedback/logging/data systems #13554
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| # MSBuild data-collection systems | ||
|
|
||
| MSBuild has three main logging and feedback systems, with different characteristics and audiences. This is an overview focused on the purposes of the systems as relevant to developers of MSBuild. | ||
|
|
||
| ## MSBuild loggers | ||
|
|
||
| Loggers are the primary user-facing way to understand what MSBuild is doing. It's possible to write a custom logger, but most people use the [built-in ones](Logging-behavior.md): | ||
|
|
||
| * `TerminalLogger` for interactive console use in .NET SDK, | ||
| * `BinaryLogger` for detailed capture and analysis, | ||
| * `ConsoleLogger`, the default MSBuild output when redirected and in `MSBuild.exe`, and | ||
| * `FileLogger`, the longstanding “more detailed than console” text output. | ||
|
|
||
| Mechanically, loggers receive logging events and note their details, serializing them in their entirety in the case of the binlog and ignoring or textualizing them for the other primary loggers. | ||
|
|
||
| New `*EventArgs` classes should carry most of their information via their _structure_, for easier analysis. Many older events render their information to a string that can be difficult to parse. | ||
|
|
||
| Logs can be and often are analyzed post-build. Interesting use cases are | ||
|
|
||
| * The Visual Studio Code or GitHub Actions “problem matcher” regexes that take text output of the build and present it as “build errors”. | ||
| * The [Structured Log Viewer](https://msbuildlog.com) application (for interactive analysis). | ||
| * Tools built on top of the binlog APIs. | ||
|
|
||
| ## Tracing events | ||
|
|
||
| MSBuild also emits [trace events](specs/event-source.md). These are structured events (ETW on Windows) that can be captured via runtime configuration outside of MSBuild. They contain less information than a full binlog, but have lower performance impact to enable. | ||
|
|
||
| These events are captured by default in Visual Studio performance infrastructure, including “Speedometer” and “Perf DDRIT” tests and Visual Studio Feedback when users “record a trace” of the problem. They can also be manually collected and analyzed in PerfView. | ||
|
rainersigwald marked this conversation as resolved.
rainersigwald marked this conversation as resolved.
|
||
|
|
||
| ## Telemetry | ||
|
|
||
| MSBuild can also be configured to send [telemetry](VS-Telemetry-Data.md) through the Visual Studio and .NET SDK channels. This allows getting aggregate data from a variety of users, but we have to consider data volume and privacy. | ||
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.