OpenTelemetry has released v1 of its Go Compile-Time Instrumentation, closing a long-standing gap where Go developers had to instrument code manually or use eBPF agents. The tool, `otelc`, hooks into the Go toolchain via `-toolexec` and injects OpenTelemetry traces and metrics at build time — no source code changes required. It covers third-party libraries and the standard library, supports `net/http`, `database/sql`, gRPC, Redis, and Go runtime metrics, and is CI/CD friendly. A single build command swap (`otelc go build` instead of `go build`) is all that's needed. The project was built collaboratively by Alibaba and Datadog under the OpenTelemetry SIG. Future plans include broader library coverage, registry-based discovery, and performance improvements.
Table of contents
What is Go Compile-Time Instrumentation?Key capabilities in v1Getting startedWhen should you use it?What’s nextGet involvedAcknowledgments42.8K Impressions1 Comment