
How we reduced the size of our Agent Go binaries by up to 77% | Datadog
2/18/2026
This post details the technical strategies employed to reduce the size of Datadog Agent Go binaries. It covers dependency auditing using `go list` and `goda` to identify and remove unnecessary packages, the application of build tags to conditionally exclude files and their imports, and the refactoring of code to move dependency-heavy functions into separate packages for selective inclusion. The post also touches upon linker optimizations and the impact of these changes on artifact size.
