0Pricing
Go Academy · Lesson

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

All lessons in this course

  1. Writing Benchmarks with testing.B
  2. CPU Profiling with pprof
  3. Heap and Allocation Profiling
  4. Execution Tracing
← Back to Go Academy