Application integration overview
Compile-time instrumentation enables non-intrusive monitoring of Go applications. The following figure shows the compilation flow. 
A go build command produces the final executable binary through the following path: 
After lexical and syntax analysis, intermediate .a files are generated. The linker combines these files into a binary. You can insert hook operations between the compiler frontend and backend, which modifies the compilation flow as follows:

The system analyzes the Abstract Syntax Tree (AST) to locate instrumentation points and inserts monitoring code based on predefined rules. The standard Go compilation process then embeds this code in the final binary.
Install instgo
Instgo is a Go compilation tool provided by Application Real-Time Monitoring Service (ARMS). Compile your Go project with instgo to enable ARMS monitoring. For more information, see Introduction to instgo.
Use the Go agent
Choose an option based on your environment: