The System.Diagnostics namespaces contain types that enable you to interact with system processes, event logs, and performance counters. Child namespaces contain types to interact with code analysis tools, to support contracts, to extend design-time support for application monitoring and instrumentation, to log event data using the Event Tracing for Windows (ETW) tracing subsystem, to read to and write from event logs and collect performance data, and to read and write debug symbol information.
The System.Diagnostics namespace provides classes that allow you to interact with system processes, event logs, and performance counters.
The System.Diagnostics.CodeAnalysis namespace contains classes for interaction with code analysis tools. These tools are used to analyze code for conformance to coding conventions such as naming or security rules.
The System.Diagnostics.Contracts namespace contains static classes for representing program contracts such as preconditions, postconditions, and invariants.
The System.Diagnostics.Contracts.Internal namespace provides classes that the binary rewriter can use to handle a contract failure.
The System.Diagnostics.Design namespace contains classes that can be used to extend design-time support for application monitoring and instrumentation.
Contains the classes used to instrument your application. The instrumentation, when enabled, logs the event data to the Event Tracing for Windows (ETW) tracing subsystem. For a complete description of ETW, see Event Tracing for Windows.
Using the System.Diagnostics.Eventing.Reader namespace, you can develop applications that read and manage event logs. An event in an event log contains information, a warning, or an error that has been published by a specific application, service, or operating system component. These events are read by applications that monitor a computer's health and applications that take action when specific events occur. For more information, see Technology Summary for Reading and Managing Event Logs and Event Log Scenarios.
Use the classes in this namespace to provide counter data. The counters are used to expose performance metrics to consumers such as the Performance Monitor. The namespace does not contain classes for consuming the counter data. For a complete description of the performance counters architecture, see Performance Counters.
The System.Diagnostics.SymbolStore namespace provides classes that allow you to read and write debug symbol information, such as source line to Microsoft intermediate language (MSIL) maps. Compilers targeting the.NET Framework can store the debug symbol information into programmer's database (PDB) files. Debuggers and code profiler tools can read the debug symbol information at run time.
The System.Diagnostics.Tracing namespace provides types and members that enable you to create strongly typed events to be captured by event tracing for Windows (ETW).