Compile-time instrumentation involves modifying source code during the build process to inject observability code. This technique uses Abstract Syntax Tree (AST) manipulation to transform code before compilation, ensuring that instrumentation is baked into the final binary. This approach provides zero runtime overhead and works well with statically compiled languages.