Compile Time Code Weaving in Go, Large Systems Debugging/Profiling
summary
A practical compile-time weaver for Go that injects instrumentation by generating new Go source so the result compiles and runs like normal code. It implements before/after advice, channel and function-wrapping, timers and latency tracing, plus validation hooks and rollbacks for accidental changes. The tool merges multiple aspects into runnable files, records timing and trace maps for requests, and exposes where early deployments found integration bugs — useful on large unfamiliar codebases but requires careful testing and some manual fixes in complex package layouts.
AI-written summary · about
chapters (11)
- 0:00Introduction to compile-time weaving
- 3:00Aspect-oriented programming basics
- 6:37Real-world examples of aspects
- 9:33Debugging and profiling with aspects
- 12:47Latency tracking with aspects
- 14:52Weaving as a fabric metaphor
- 16:03Variable reuse in aspects
- 17:47Aspect limitations and pitfalls
- 19:11Aspect execution order
- 20:35Debugging aspects effectively
- 21:42Library-based aspect weaving
related talks
22mDynamic Go Instrumentation for Production Environments
31mAdvancing Observability With Compile-Time Auto-Instrumentation in Golang
51mGo Tooling in Action
19mService Weaver: A Framework for Writing Distributed Systems
16mTools for working with Go Code
16mLightning Talks
43mDebugging Code Generation in Go
43mDeep dive into Go's build system
