How to instrument Go code in 2020
summary
Argues that tracing is the hard part and that OpenTelemetry as tracing successor is the pragmatic bet (tracing vendors and an emerging collector ecosystem drive it), while logging and metrics remain simpler: use standard log/expvar or structured loggers and Prometheus-style metrics like the Prometheus client with 11,613 importers. Recommends three concrete rules: accept OpenTelemetry for distributed traces, keep logs and metrics idiomatic and lightweight, and follow existing org conventions rather than ripping things out.
AI-written summary · about
chapters (12)
- 0:00Introduction to instrumentation
- 2:14History of code instrumentation
- 7:17What instrumentation means
- 9:03Go’s built-in tooling
- 12:36Structured logging and metrics
- 15:49Need for unified telemetry
- 19:02Why Go should care about other languages
- 23:16Challenges in instrumentation
- 26:27OpenTelemetry’s role
- 28:35Three steps to peace of mind
- 30:22Practical advice for 2020
- 32:11Q&A
