Unleashing the Go Toolchain
summary
Reveals that the Go -toolexec flag lets a simple wrapper turn every go build into a programmable pipeline that parses AST/SSA, injects generated code (logging, spans, error stack capture), and produces binaries with zero runtime reflection overhead; Datadog’s Orchestrion implements YAML-driven integrations that auto-instrument Gorilla/chi/gRPC/SQL, shows generated source with a debug/diff mode, and accepts a ~10–20% compile-time cost while avoiding runtime slowdown; project is donated into OpenTelemetry SIG for production use.
AI-written summary · about
chapters (13)
- 0:00Introduction and context
- 2:08The case for simplicity in Go
- 3:41Observability and instrumentation
- 5:54Manual vs automatic instrumentation
- 10:02The challenge of Go instrumentation
- 12:23Leveraging the toolchain
- 16:10AST manipulation techniques
- 23:46Compile-time code transformation
- 27:07Aspect-oriented programming
- 32:24Introducing Orchestrion
- 38:51Performance and future outlook
- 42:19Future of OpenTelemetry in Go
- 47:40Dark magic and conclusion








