-
Notifications
You must be signed in to change notification settings - Fork 5.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Misc diagnostic doc cleanup (#42359)
* Misc diagnostic doc cleanup I was recently reviewing the diagnostic docs and accumulated a variety of small fixes, improvements, and updates: - Added links to using the Meters to the built-in metrics pages that didn't have one. - Moved links for EventCounters and PerformanceCounters to the bottom of built-in-metrics.md to make it clearer these are different from the System.Diagnostics.Metrics API and to avoid being a distraction. - On the comparison pages for both metrics and logging I significantly reduced content about terminology and principles that is fairly generalized across all languages that have these features. I am assuming that most readers are either familiar with the basics already or they can learn it elsewhere. This reduces abstraction, allows the reader to get to the .NET specific APIs much quicker, and ensures that the top-most recommended API should be visible without needing to scroll down. - Updated references to out-of-date OpenTelemetry packages and removed usage of the obsolete StartWithHost() OTel API. - Updated some example snippets to remove nullability build warnings - Fixed a compilation error where a metrics snippet refered to a non-existant overload of Random.GetNext() - Updated the output of several examples to account for changes in OTel console exporter and dotnet-counters output - Updated some of the old examples to use newer SDK versions - Adjusted warnings about dotnet-trace bitness matching that appear to no longer be accurate. In the past there apparently was an issue calling Process.GetProcessById() and potentially other System.Diagnostic.Process functions when the application bitness running the code didn't match the bitness of the process being inspected. Testing now I didn't detect any issues running x86 dotnet-trace against a 64 bit target process or vice versa with one exception - x86 dotnet-trace doesn't correctly show the command lines of 64 bit apps in the ps command. - Removed some spurious warnings about using dotnet-trace with apps older than .NET 5. The doc already mentions .NET 5+ is supported so there seemed no need to keep repeating it. - Removed the dotnet-trace EventCounter collection example. The functionality should still work but this seems like an obscure scenario that would rarely be useful. I didn't want to give the impression this was a common technique we expect users to need or encourage them to do. Using dotnet-counters or dotnet-monitor would be a more natural and convenient approach to collect that data ad-hoc. - Added a note to EventCounters about the newer Metrics API to ensure readers are aware this older API is not the preferred one in most scenarios. - Added information about the Gauge instrument that was added during .NET 8. - Removed/adjusted some discussion about the dotnet-counters output format that is no longer accurate given recent changes to the tool's output behavior. - Adjusted the stack overflow debugging example to account for the stacktrace that is shown in all currently supported versions of the runtime. * Apply suggestions from code review Co-authored-by: Genevieve Warren <[email protected]> * Applying review feedback --------- Co-authored-by: Genevieve Warren <[email protected]>
- Loading branch information
Showing
10 changed files
with
166 additions
and
197 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.