From 309aadd92495771066cb6eb6a61ca3ab502b879c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marie=20P=C3=ADchov=C3=A1?= <11718369+ManickaP@users.noreply.github.com> Date: Thu, 22 Jan 2026 16:21:29 +0100 Subject: [PATCH 1/2] Update telemetry events documentation with PII warning Added information about potential PII in internal diagnostics events and provided an example command to consume these events using dotnet-trace. --- docs/fundamentals/networking/telemetry/events.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/fundamentals/networking/telemetry/events.md b/docs/fundamentals/networking/telemetry/events.md index 05fecb2f1fff0..082e95d511a3a 100644 --- a/docs/fundamentals/networking/telemetry/events.md +++ b/docs/fundamentals/networking/telemetry/events.md @@ -288,7 +288,7 @@ You should think about such events separately. Monitor DNS resolutions or TLS ha ## Internal diagnostics Some components in .NET are instrumented with additional debug-level events that provide more insight into exactly what's happening internally. -These events come with high performance overhead and their shape is constantly changing. As the name suggests, they are not part of the public API and you should therefore not rely on their behavior or existence. +These events come with high performance overhead and their shape is constantly changing. As the name suggests, they are not part of the public API and you should therefore not rely on their behavior or existence. Moreover, they are not redacted and might contain PII. Regardless, these events can offer a lot of insights when all else fails. The `System.Net` stack emits such events from `Private.InternalDiagnostics.System.Net.*` namespaces. @@ -296,6 +296,12 @@ The `System.Net` stack emits such events from `Private.InternalDiagnostics.Syste If you change the condition in the `EventListener` example above to `eventSource.Name.Contains("System.Net")`, you will see 100+ events from different layers in the stack. For more information, see the [full example](https://github.com/dotnet/docs/tree/main/docs/fundamentals/networking/snippets/internal-diag-telemetry/Program.cs). +To consume them outside of the process, you can use `dotnet-trace`, for example: + +```console +dotnet-trace collect --providers Private.InternalDiagnostics.System.Net.Http:0xf --process-id 1234 +``` + ## Samples - [Measure DNS resolutions for a given endpoint](#measure-dns-resolutions-for-a-given-endpoint) From e3684a693d225c6b0626fe8ea5f4e64524445796 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marie=20P=C3=ADchov=C3=A1?= <11718369+ManickaP@users.noreply.github.com> Date: Thu, 22 Jan 2026 18:35:11 +0100 Subject: [PATCH 2/2] Update docs/fundamentals/networking/telemetry/events.md Co-authored-by: Genevieve Warren <24882762+gewarren@users.noreply.github.com> --- docs/fundamentals/networking/telemetry/events.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/fundamentals/networking/telemetry/events.md b/docs/fundamentals/networking/telemetry/events.md index 082e95d511a3a..a83b4e9bea773 100644 --- a/docs/fundamentals/networking/telemetry/events.md +++ b/docs/fundamentals/networking/telemetry/events.md @@ -296,7 +296,7 @@ The `System.Net` stack emits such events from `Private.InternalDiagnostics.Syste If you change the condition in the `EventListener` example above to `eventSource.Name.Contains("System.Net")`, you will see 100+ events from different layers in the stack. For more information, see the [full example](https://github.com/dotnet/docs/tree/main/docs/fundamentals/networking/snippets/internal-diag-telemetry/Program.cs). -To consume them outside of the process, you can use `dotnet-trace`, for example: +To consume them outside of the process, use `dotnet-trace`, for example: ```console dotnet-trace collect --providers Private.InternalDiagnostics.System.Net.Http:0xf --process-id 1234