Go

How to Instrument Go Without Changing a Single Line of Code

<p>Zero-touch observability for Go is finally becoming real. In this talk, we’ll walk through the different strategies you can use to instrument Go applications <strong>without changing a single line of code</strong>, and what they cost you in terms of overhead, stability, and security.</p> <p>We’ll compare several concrete approaches and projects:</p> <ul> <li><strong>eBPF-based auto-instrumentation</strong>, using OpenTelemetry’s Go auto-instrumentation agent: </li> <li><a href="https://github.com/open-telemetry/opentelemetry-go-instrumentation">https://github.com/open-telemetry/opentelemetry-go-instrumentation</a> </li> <li><a href="https://opentelemetry.io/docs/zero-code/obi/">https://opentelemetry.io/docs/zero-code/obi/</a> </li> <li><strong>Compile-time manipulation</strong>, using tools that rewrite or augment Go binaries at build time, such as: </li> <li><a href="https://github.com/alibaba/opentelemetry-go-auto-instrumentation">https://github.com/alibaba/opentelemetry-go-auto-instrumentation</a> </li> <li><strong>Runtime techniques</strong>, including agents, shared-library injection, and binary trampolines, as used in OpenTelemetry’s Go “Autosdk” work: </li> <li><a href="https://opentelemetry.io/docs/zero-code/go/autosdk/">https://opentelemetry.io/docs/zero-code/go/autosdk/</a> </li> <li><strong>USDT (User Statically-Defined Tracing) probes</strong>, exploring how to add or generate USDT probe points for Go services (at build time or via injection) so that external tooling (eBPF, DTrace-style tools, etc.) can consume high-level events without source changes.</li> </ul> <p>Beyond what exists today, we’ll look at how ongoing work in the Go runtime and diagnostics ecosystem could unlock cleaner, safer hooks for future auto-instrumentation, including:</p> <ul> <li><code>runtime/trace</code> and diagnostics primitives: </li> <li><a href="https://pkg.go.dev/runtime/trace">https://pkg.go.dev/runtime/trace</a> </li> <li><a href="https://go.dev/doc/diagnostics">https://go.dev/doc/diagnostics</a> </li> <li>Proposals such as Go “flight recording” (Issue #63185): </li> <li><a href="https://github.com/golang/go/issues/63185">https://github.com/golang/go/issues/63185</a></li> </ul> <p>Throughout the talk, we’ll use <strong>benchmark results and small, realistic services</strong> to compare these strategies along three axes:</p> <ul> <li>Performance overhead (latency, allocations, CPU impact) </li> <li>Robustness and upgradeability across Go versions and container images </li> <li>Operational friction: rollout complexity, debugging, and failure modes</li> </ul> <p>Attendees will leave with a clear mental model of <strong>when to choose eBPF, compile-time rewriting, runtime injection, or USDT-based approaches</strong>, how OpenTelemetry’s Go auto-instrumentation fits into that picture, and where upcoming runtime features might take us next. The focus is strongly practical and open-source: everything shown will be reproducible using publicly available tooling in the Go and OpenTelemetry ecosystems.</p>

Additional information

Live Stream https://live.fosdem.org/watch/ub5132
Type devroom
Language English

More sessions

2/1/26
Go
Maartje Eyskens
UB5.132
<p>What is new since Go 1.25. In this talk we'll bring you up to date with all upcoming changes to the Go language and the community! Go 1.26 will be released in February 2026, we will be taking a look to all upcoming features as well as give an update on important changes in Go 1.235 This includes traditionally updates about the language, tooling, libraries, ports and most importantly the Go Community.</p>
2/1/26
Go
Victor Lyuboslavsky
UB5.132
<p>Most Go codebases begin as straightforward layered monoliths, but years of growth often turn those layers into a web of hidden coupling, unclear ownership, and hard-to-predict side effects. Small changes start requiring deep context, and compile and test times slowly creep up, turning routine work into risky work. Rewrites promise a clean slate but rarely succeed in practice. What the Go community lacks are real examples of large open source Go projects that have successfully evolved toward a ...
2/1/26
Go
Jesús Espino
UB5.132
<p>Go’s runtime has always prided itself on efficient, low-latency garbage collection. But modern hardware brings new challenges. More cores, bigger caches, and heavier workloads. In this talk, we’ll start by exploring how Go’s current garbage collector and memory allocator work together to manage memory. Then we’ll dive into the new GreenTea GC, an experimental redesign that cleans memory in groups (“spans”) instead of object-by-object. You’ll learn how it works, why it matters, ...
2/1/26
Go
Valentyn Yukhymenko
UB5.132
<p>Reflection is a form of metaprogramming that often feels like magic — letting you inspect and manipulate your code at runtime. But there's no magic here at all — just clever engineering that makes your programs simpler and more flexible.</p> <p>In this talk, we'll take a look at how reflection actually works under the hood in Go. We'll explore how types and values are represented at runtime, what really happens when you call <code>reflect.ValueOf</code> or <code>reflect.TypeOf</code>, and ...
2/1/26
Go
Christian Simon
UB5.132
<h2>The Problem</h2> <p>Go's pprof tells you <em>where</em> your CPU time is spent, but not <em>why</em> the CPU is slow. Is it cache misses? Branch mispredictions? These hardware-level performance characteristics are invisible to pprof but critical for optimisation.</p> <h2>The Solution</h2> <p>perf-go bridges this gap by leveraging Linux's <code>perf</code> tool and CPU Performance Monitoring Units (PMUs) to expose hardware performance counters for Go programs. It translates perf's low-level ...
2/1/26
Go
Ronna Steinberg
UB5.132
<p>Go 1.25 introduced <code>testing/synctest</code>, a package that brings deterministic scheduling and control over concurrency during tests. For developers who struggle with flaky tests, hidden data races, or hard-to-reproduce timing issues, synctest offers a powerful solution: it lets you run concurrent code in a bubble, so you can efficiently explore interleavings, force edge cases, and prove correctness.</p> <p>In this talk, we’ll explore the motivation behind synctest, and dive into the ...
2/1/26
Go
Akihiro Suda
UB5.132
<p>Open source is under attack. Most notably the xz/liblzma backdoor incident (CVE-2024-3094) has shown how even trusted and widely adopted libraries can be compromised. Also, since February 2025, the Go language community has been observing an enormous amount of malicious Go modules being published with fake GitHub stars and very plausible contents.</p> <p>This session introduces gomodjail, an experimental tool that “jails” Go modules by applying syscall restrictions using seccomp and ...