Viewing/Tracing NetEventSource Logs

Written for dotnet-trace version 8.0.510501


Download from Microsoft:

Run Trace

To find pid:

dotnet-trace ps

To begin trace:

Replace <pid> with the value from the previous step

dotnet-trace collect --process-id <pid> --providers Private.InternalDiagnostics.System.Net.Sockets --output sockets.nettrace

View trace

Open the output socket.nettrace file in PerfView



The Private.InternalDiagnostics.System.Net.Sockets value comes from the EventSource attribute in the NetEventSource source code. See: NetEventSource.Sockets.cs