Automatically Instrument Your Go Source Code with Orchestrion
summary
Datadog’s Orchestrion automatically inserts and removes OpenTelemetry or console tracing into Go source by parsing with go/ast & dst, matching functions, HTTP handlers and clients, and injecting comment markers like DD span/ignore comments plus start/end wrappers. It runs either as a source rewrite (commitable edits) or invisibly via -toolexec preprocessing that writes instrumented files to a temp dir, uses an ldflag package variable to choose backend, requires context as first param for wrapped functions, and the demo shows roundtrip add/remove working.
AI-written summary · about
chapters (14)
- 0:00Introduction
- 1:06Go's non-magical nature
- 2:48Telemetry and tracing
- 6:12Automatic instrumentation
- 8:29The challenge of Go magic
- 10:38Introducing orchestrion
- 12:06Orchestrion demo
- 13:42Abstract Syntax Trees
- 18:21Implementing instrumentation
- 26:56Handling HTTP and cleanup
- 28:54Configuring tracing targets
- 30:55Compile-time magic
- 35:34Automating library support
- 39:32Conclusion and safe magic
related talks
16mLightning Talks
19mInstrumenting Go Apps With OpenTelemetry
20mStrategies for Auto-Instrumenting Go Applications Without Code Changes
31mAdvancing Observability With Compile-Time Auto-Instrumentation in Golang
22mDynamic Go Instrumentation for Production Environments
30mMastering Distributed Tracing with Go
34mOpenTelemetry for Dummies: Instrumenting Go Apps
40mInstrumenting GO Applications
