What canceled my Go context?
Summary
The article explains how Go 1.20 and 1.21 added cause-tracking APIs for context cancellation and highlights common pitfalls, such as defer cancel() discarding the cause on normal returns. It demonstrates how to attach and read causes, discusses the trade-offs between explicit cancellation vs timeouts, and offers patterns to improve observability and debugging in Go services.