Reads .NET EventPipe NetTrace streams into resolved CPU-sample stacks and attaches to a running .NET process over its diagnostics IPC. Package nettrace, module github.com/Rethunk-Tech/go-nettrace.
Parse turns a NetTrace V4/V5 stream (what dotnet-trace and the runtime's diagnostics IPC write) into thread
samples whose stack frames are named from the trace's own JIT, loader and rundown events, so no symbol files are
needed. StartTracing starts such a stream from a running .NET process.
go get github.com/Rethunk-Tech/go-nettraceA worked example and the contracts: HUMANS.md.
- Frames resolve to method, declaring type and assembly by address.
- Samples carry a 64-bit thread ID and whether the thread was in managed code.
- Newer or unknown formats (NetTrace V6) are refused with
ErrUnsupportedVersion, never guessed at. - Finds a process's diagnostics socket or named pipe, including a containerised process's
TMPDIRon Linux. - Every call is bound to its
context.Context, andStopnever outlives it. - Standard library only.
| Doc | Audience |
|---|---|
| HUMANS.md | Running and using the package |
| AGENTS.md | Internals, invariants, and why |
| CONTRIBUTING.md | Process — commits, tests, docs |
| SECURITY.md | Vulnerability disclosure |
| CHANGELOG.md | Release notes |
MIT — see LICENSE. © 2026 Rethunk.Tech, LLC.