Execution Tracing
go tool trace for goroutine-level analysis
What is execution tracing?
The Go execution tracer records a timeline of goroutine scheduling, GC events, syscalls, and heap growth. It provides a visual view of parallelism and latency unavailable from CPU or heap profiles.
Capturing a trace
Capture a trace via the HTTP endpoint:
curl http://localhost:6060/debug/pprof/trace?seconds=5 -o trace.out
go tool trace trace.out