Performance (event) counters have existed since the beginning of Windows but they have not been implemented in the other operating systems in the same way, which makes them not cross-platform. The idea is that applications emit lightweight, unobtrusive code that is picked up by the operating system and can be used to monitor the application in real time, as it is working, or to generate dump files for post-mortem analysis.
.NET Core 3.0 started supporting event counters to its full extent by introducing the dotnet-trace, dotnet-dump, and dotnet-counterscross-platform global tools. We will see what these do in the following sections.
Included counters
An event counter is a class that emits a value for a named counter. .NET includes the following counters, grouped into two providers:
- System.Runtime (default)
- Microsoft.AspNetCore.Hosting...