Advancing Observability With Compile-Time Auto-Instrumentation in Golang
Talkat KubeCon + CloudNativeCon China 2025 · on Tuesday, 2025-06-10· at 14:30· Level 16 | Grand Ballroom I·
summary
An implementation wraps the go build process to perform compile-time auto-instrumentation by analyzing a dry-run log, matching dependency rules, injecting helper packages, and rewriting compiled IR to insert trampoline jumps into matched functions such as net HTTP RoundTripper. It implements automatic context propagation via a goroutine local storage copied on goroutine creation, uses go:linkname to redirect to instrumentation hooks, and emits traces and metrics to an OpenTelemetry collector; the demo shows four generated traces, Prometheus metrics and Jaeger traces.
AI-written summary · about
chapters (11)
- 0:00Introduction
- 1:05Why Go for instrumentation
- 6:29Observability techniques compared
- 10:50Go compilation and AST
- 14:28Zero-code instrumentation stages
- 17:23Context propagation in traces
- 20:18Custom and auto-instrumentation unified
- 21:43Logs and traces auto-correlation
- 23:30Live demo
- 28:06Project history and future
- 30:17Q&A
related talks
22mDynamic Go Instrumentation for Production Environments
39mAuto-Instrumenting Go Libraries for Tracing with eBPF and OpenTelemetry
33mInstrument Go Without Changing a Single Line
23mCompile Time Code Weaving in Go, Large Systems Debugging/Profiling
30mMastering Distributed Tracing with Go
40mInstrumenting GO Applications
43mAutomatically Instrument Your Go Source Code with Orchestrion
20mStrategies for Auto-Instrumenting Go Applications Without Code Changes
