All Products
Search
Document Center

Container Service for Kubernetes:Go application monitoring

Last Updated:Aug 29, 2026

Application Real-Time Monitoring Service (ARMS) monitors Go applications in a Container Service for Kubernetes (ACK) cluster. Install the ack-onepilot add-on, compile the Go binary file with the instgo build tool, and build the container image. After deployment, view monitoring data such as the application topology, interface calls, and database analysis.

Prerequisites

Step 1: Install ack-onepilot, the ARMS application monitoring add-on

  1. Log on to the ACK console. In the left-side navigation pane, click Clusters.

  2. On the Clusters page, click the name of your cluster. In the left-side navigation pane, click Components and Add-ons.

Important

Make sure that the version of ack-onepilot is 3.2.4 or later. By default, the ack-onepilot add-on supports up to 1,000 pods. For every 1,000 pods that exceed this limit, increase the CPU resources for ack-onepilot by 0.5 cores and the memory resources by 512 MB.

Step 2: Compile the Go binary file and build the container image

Use the enhanced Go build tool instgo together with a local Go build environment (Go 1.18 or later) to compile your Go program into a binary file that reports monitoring data to ARMS.

  1. (Optional) If your project includes a vendor directory during the build, add -mod=vendor after go build.

  2. Use the wget command to download the instgo build tool.

    During the build process, instgo updates automatically. Save instgo in a directory where the build user has write permissions.

    Note

    instgo is a build tool from ARMS that instruments your Go project, enabling ARMS to monitor your application.

    If your build environment has internet access to Object Storage Service (OSS), select the China (Hangzhou) internet download URL that corresponds to the operating system and architecture of the build environment.

    Download commands

    Linux (AMD64)

    wget "http://arms-apm-cn-hangzhou.oss-cn-hangzhou.aliyuncs.com/instgo/instgo-linux-amd64" -O instgo

    Linux (ARM64)

    wget "http://arms-apm-cn-hangzhou.oss-cn-hangzhou.aliyuncs.com/instgo/instgo-linux-arm64" -O instgo

    Mac (ARM64)

    wget "http://arms-apm-cn-hangzhou.oss-cn-hangzhou.aliyuncs.com/instgo/instgo-darwin-arm64" -O instgo

    Mac (AMD64)

    wget "http://arms-apm-cn-hangzhou.oss-cn-hangzhou.aliyuncs.com/instgo/instgo-darwin-amd64" -O instgo

    Windows (AMD64)

    wget "http://arms-apm-cn-hangzhou.oss-cn-hangzhou.aliyuncs.com/instgo/instgo-windows-amd64.exe" -O instgo.exe
  3. Make the build tool executable.

    Linux/Mac

    # Grant the executable permission.
    chmod +x instgo

    Windows

    You do not need to grant the executable permission on Windows.

  4. (Optional) Configure a UID as a build parameter.

    Important

    If you skip this step, instgo installs the latest version of the ARMS agent by default.

    Configuring a UID requires instgo 1.4.5 or later. Use the set command to configure a UID as a build parameter.

    # The UID is the ID of your Alibaba Cloud primary account.
    instgo set --uid={YourAliyunUid}
  5. Add instgo as a prefix to your original build command and run the command.

    instgo go build {arg1} {arg2} {arg3}

    If you use go install to build the project, you can also add instgo as a prefix to your original build command.

  6. Use the binary file generated in the previous step to build the container image.

Step 3: Enable ARMS application monitoring for your Go application

  1. Log on to the ACK console. In the left-side navigation pane, click Clusters.

  2. On the Clusters page, click the name of your cluster. In the left-side navigation pane, choose Workloads > Deployments.

  3. On the Deployments page, find your application and click Edit YAML in the Actions column.

  4. In the YAML file, add the following labels to the spec.template.metadata level.

    labels:
      aliyun.com/app-language: golang # Required for Go applications. This indicates that this is a Go application.
      armsPilotAutoEnable: 'on'
      armsPilotCreateAppName: "<YOUR-DEPLOYMENT-NAME>"    # Replace <YOUR-DEPLOYMENT-NAME> with your application name.

Step 4: View monitoring details

  1. After about one minute, go to the ARMS console. In the left-side navigation pane, choose Application Monitoring > Applications to view the Go application and the data that it reports.

    An application named otel-go-server appears in the application list. A green status indicates that the application runs normally. View monitoring metrics such as requests per second, error rate, and average response time to confirm that data is reported.

  2. In the Application Name column, click the name of your application to go to the application monitoring page of the ARMS console and view the monitoring details. For more information, see Application overview.

(Optional) Step 5: Release resources

If you no longer need to monitor the application, uninstall the ARMS agent. For more information, see Uninstall the ARMS agent for Go.