You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/core/diagnostics/index.md
+8-12Lines changed: 8 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,9 +5,9 @@ ms.date: 10/20/2023
5
5
ms.topic: overview
6
6
#Customer intent: As a .NET Core developer I want to find the best tools to help me diagnose problems so that I can be productive.
7
7
---
8
-
# What diagnostic tools are available in .NET Core?
8
+
# Diagnostics in .NET
9
9
10
-
Software doesn't always behave as you would expect, but .NET Core has tools and APIs that will help you diagnose these issues quickly and effectively.
10
+
Software doesn't always behave as you would expect, but .NET has tools and APIs that will help you diagnose these issues quickly and effectively.
11
11
12
12
[Native AOT deployment](../../core/deploying/native-aot/index.md) is an application model that's been available since .NET 7. For information about .NET 8 diagnostic support for Native AOT apps, see [Native AOT diagnostics](../../core/deploying/native-aot/diagnostics.md).
13
13
@@ -17,9 +17,9 @@ This article helps you find the various tools you need.
17
17
18
18
[Debuggers](managed-debuggers.md) allow you to interact with your program. Pausing, incrementally executing, examining, and resuming gives you insight into the behavior of your code. A debugger is a good choice for diagnosing functional problems that can be easily reproduced.
19
19
20
-
## Unit testing
20
+
## Profilers
21
21
22
-
[Unit testing](../testing/index.md)is a key component of continuous integration and deployment of high-quality software. Unit tests are designed to give you an early warning when you break something.
22
+
[Profilers](profilers.md)allow you to analyze your program's performance. You can collect data on memory usage, CPU usage, and other metrics to diagnose and understand performance issues.
23
23
24
24
## Instrumentation for observability
25
25
@@ -50,10 +50,6 @@ There are multiple ways that the instrumentation data can be egressed from the a
50
50
-[dotnet-monitor](./dotnet-monitor.md) - an agent for collecting traces and telemetry
51
51
- Third-party libraries or app code can read the information from the <xref:System.Diagnostics.Metrics?displayProperty=nameWithType>, <xref:Microsoft.Extensions.Logging.ILogger%601>, and <xref:System.Diagnostics.Activity?displayProperty=nameWithType> APIs.
52
52
53
-
## Resource monitoring
54
-
55
-
[Resource monitoring](diagnostic-resource-monitoring.md) is the process of continuously observing and tracking the utilization, performance, and availability of various computing resources within a system. These resources can include hardware components (such as CPUs, memory, disk storage, and network interfaces) as well as software components (like applications and services). Resource monitoring is often used to detect and diagnose performance issues, and to ensure that the system is operating within expected parameters.
56
-
57
53
## Specialized diagnostics
58
54
59
55
If debugging or observability is not sufficient, .NET supports additional diagnostic mechanisms such as EventSource, Dumps, DiagnosticSource. For more information, see the [specialized diagnostics](./specialized-diagnostics-overview.md) article.
@@ -64,10 +60,6 @@ If debugging or observability is not sufficient, .NET supports additional diagno
64
60
65
61
## .NET Core diagnostics tutorials
66
62
67
-
### Write your own diagnostic tool
68
-
69
-
[The diagnostics client library](diagnostics-client-library.md) lets you write your own custom diagnostic tool best suited for your diagnostic scenario. Look up information in the [Microsoft.Diagnostics.NETCore.Client API reference](microsoft-diagnostics-netcore-client.md).
70
-
71
63
### Debug a memory leak
72
64
73
65
[Tutorial: Debug a memory leak](debug-memory-leak.md) walks through finding a memory leak. The [dotnet-counters](dotnet-counters.md) tool is used to confirm the leak and the [dotnet-dump](dotnet-dump.md) tool is used to diagnose the leak.
@@ -95,3 +87,7 @@ If debugging or observability is not sufficient, .NET supports additional diagno
95
87
### Measure performance using EventCounters
96
88
97
89
[Tutorial: Measure performance using EventCounters in .NET](event-counter-perf.md) shows you how to use the <xref:System.Diagnostics.Tracing.EventCounter> API to measure performance in your .NET app.
90
+
91
+
### Write your own diagnostic tool
92
+
93
+
[The diagnostics client library](diagnostics-client-library.md) lets you write your own custom diagnostic tool best suited for your diagnostic scenario. For more information, see the [Microsoft.Diagnostics.NETCore.Client API reference](microsoft-diagnostics-netcore-client.md).
Profilers allow you to analyze your program's performance. By analyzing data on memory usage, CPU usage, call stacks and other information, you can better understand the performance profile of your program.
9
+
10
+
Microsoft provides a profiler with [Visual Studio](/visualstudio/profiling/beginners-guide-to-performance-profiling) and through the [dotnet-trace](dotnet-trace.md) tool.
11
+
12
+
## Visual Studio profiler
13
+
14
+
**Visual Studio** is an integrated development environment and an excellent choice for developers working on Windows.
15
+
16
+
-[Measure app performance in Visual Studio](/visualstudio/profiling/)
17
+
18
+
## dotnet-trace
19
+
20
+
[`dotnet-trace`](dotnet-trace.md) is a cross-platform command-line tool that collects diagnostic traces on Windows, Linux, and Mac. You can view these traces in [Visual Studio](/visualstudio/profiling/beginners-guide-to-performance-profiling?#step-2-analyze-cpu-usage-data) or [PerfView](https://github.com/microsoft/perfview).
Copy file name to clipboardExpand all lines: docs/core/diagnostics/specialized-diagnostics-overview.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,10 +13,6 @@ If debugging or observability is not sufficient, .NET supports additional diagno
13
13
14
14
Event Source data can be collected in-process using the <xref:System.Diagnostics.Tracing.EventListener?displayProperty=nameWithType> API or with external diagnostics tools such as [Visual Studio](/visualstudio/profiling), [dotnet-monitor](./dotnet-monitor.md), [dotnet-trace](./dotnet-trace.md), [PerfView](https://github.com/microsoft/perfview), and the [Perfcollect](./trace-perfcollect-lttng.md) scripts. Using the external tools to collect event source data in traces is commonly used for performance analysis.
15
15
16
-
### Collect diagnostics in containers
17
-
18
-
The same diagnostics tools that are used in non-containerized Linux environments can also be used to [collect diagnostics in containers](diagnostics-in-containers.md). There are just a few usage changes needed to make sure the tools work in a Docker container.
19
-
20
16
### EventPipe
21
17
22
18
[EventPipe](./eventpipe.md) is a runtime component that can be used to collect tracing data, similar to ETW or LTTng. The goal of EventPipe is to allow .NET developers to easily trace their .NET applications without having to rely on platform-specific, OS-native components, such as ETW or LTTng.
@@ -41,7 +37,11 @@ The .NET runtime exposes a service endpoint that allows other processes to send
41
37
42
38
## DiagnosticSource & DiagnosticListener
43
39
44
-
[DiagnosticSource](./diagnosticsource-diagnosticlistener.md) is a module that allows code to be instrumented for production-time logging of rich data payloads for consumption within the process that was instrumented. At run time, consumers can dynamically discover data sources and subscribe to the ones of interest. <xref:System.Diagnostics.DiagnosticSource?displayProperty=nameWithType> was designed to allow in-process tools to access rich data, such as by [OpenTelemetry instrumentation libraries](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/blob/main/src/OpenTelemetry.Instrumentation.AspNetCore/README.md). DiagnosticSource data can also be egressed via EventPipe, which enables rich diagnostic data to be collected by dedicated tools. |
40
+
[DiagnosticSource](./diagnosticsource-diagnosticlistener.md) is a module that allows code to be instrumented for production-time logging of rich data payloads for consumption within the process that was instrumented. At run time, consumers can dynamically discover data sources and subscribe to the ones of interest. <xref:System.Diagnostics.DiagnosticSource?displayProperty=nameWithType> was designed to allow in-process tools to access rich data, such as by [OpenTelemetry instrumentation libraries](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/blob/main/src/OpenTelemetry.Instrumentation.AspNetCore/README.md). DiagnosticSource data can also be egressed via EventPipe, which enables rich diagnostic data to be collected by dedicated tools.
41
+
42
+
## Collect diagnostics in containers
43
+
44
+
The same diagnostics tools that are used in non-containerized Linux environments can also be used to [collect diagnostics in containers](diagnostics-in-containers.md). There are just a few usage changes needed to make sure the tools work in a Docker container.
0 commit comments