All Products
Search
Document Center

Application Real-Time Monitoring Service:Automatically install a Go agent in a general-purpose Kubernetes environment

Last Updated:Nov 19, 2025

You can use Application Real-Time Monitoring Service (ARMS) to monitor Go applications that run in a general-purpose Kubernetes environment. This lets you monitor metrics such as application topology, API calls, slow transactions, and SQL analysis. This topic describes how to integrate a Go application in a general-purpose Kubernetes environment with Application Monitoring.

Note

This topic does not apply if your Kubernetes cluster is an Alibaba Cloud Container Service for Kubernetes (ACK) cluster. To connect an ACK cluster to ARMS, see Install a Go agent in a Container Service for Kubernetes (ACK) or Container Compute Service (ACS) cluster using the ack-onepilot component.

Prerequisites

  • The kube-apiserver component in your Kubernetes cluster must be version 1.10 or later.

  • If your Kubernetes cluster is not deployed on Alibaba Cloud, ensure that it can access the Internet. Alternatively, you can establish a network connection between an Alibaba Cloud Virtual Private Cloud (VPC) and the cluster using a method such as Cloud Enterprise Network (CEN).

  • Your Go application must be version 1.18 or later.

Step 1: Compile the Go application image

If your project uses go vendor to manage dependencies, make sure the go.mod file includes the google.golang.org/protobuf dependency, which can be direct or indirect. Then, add the -mod=vendor flag to your compile command.

Click to view how to add the protobuf dependency

If your go.mod file does not contain the protobuf dependency, add it as follows:

  1. In the import section of your project's main.go file, add the following dependencies:

    _ "google.golang.org/protobuf/proto"
    _ "google.golang.org/protobuf/runtime/protoimpl"
  2. Run the following commands to automatically download missing dependencies and sync them to the vendor folder.

    go mod tidy
    go mod vendor

If your project is not compiled using go vendor, you do not need to perform these operations.

Method 1 (recommended): Manually build the Go application image

  1. Use the wget command to download the compile tool instgo. Select the download address based on your compile-time environment and your machine's region.

    instgo automatically updates during compilation. Save the instgo file in a directory where the current user has write permissions.

    Note
    • Instgo is a compile tool for Go applications provided by ARMS. Compiling your Go project with instgo allows ARMS to monitor your application.

    • The compile tools for all regions are the same. If your environment can access Object Storage Service (OSS) over the Internet, you can use the public endpoint for the corresponding operating system and architecture in the China (Hangzhou) region to download the tool.

    Click to view the download commands for each region

    Linux (AMD64)

    Region

    Public endpoint

    VPC endpoint

    China (Hangzhou)

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

    China (Shanghai)

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

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

    China (Qingdao)

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

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

    China (Beijing)

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

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

    China (Zhangjiakou)

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

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

    China (Hohhot)

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

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

    China (Ulanqab)

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

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

    China (Shenzhen)

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

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

    China (Heyuan)

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

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

    China (Guangzhou)

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

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

    China (Chengdu)

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

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

    China (Hong Kong)

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

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

    Singapore

    wget "http://arms-apm-ap-southeast-1.oss-ap-southeast-1.aliyuncs.com/instgo/instgo-linux-amd64" -O instgo

    wget "http://arms-apm-ap-southeast-1.oss-ap-southeast-1-internal.aliyuncs.com/instgo/instgo-linux-amd64" -O instgo

    Asia-Pacific SE 3 (Kuala Lumpur)

    wget "http://arms-apm-ap-southeast-3.oss-ap-southeast-3.aliyuncs.com/instgo/instgo-linux-amd64" -O instgo

    wget "http://arms-apm-ap-southeast-3.oss-ap-southeast-3-internal.aliyuncs.com/instgo/instgo-linux-amd64" -O instgo

    Asia-Pacific SE 5 (Jakarta)

    wget "http://arms-apm-ap-southeast-5.oss-ap-southeast-5.aliyuncs.com/instgo/instgo-linux-amd64" -O instgo

    wget "http://arms-apm-ap-southeast-5.oss-ap-southeast-5-internal.aliyuncs.com/instgo/instgo-linux-amd64" -O instgo

    Asia-Pacific NE 1 (Tokyo)

    wget "http://arms-apm-ap-northeast-1.oss-ap-northeast-1.aliyuncs.com/instgo/instgo-linux-amd64" -O instgo

    wget "http://arms-apm-ap-northeast-1.oss-ap-northeast-1-internal.aliyuncs.com/instgo/instgo-linux-amd64" -O instgo

    EU Central 1 (Frankfurt)

    wget "http://arms-apm-eu-central-1.oss-eu-central-1.aliyuncs.com/instgo/instgo-linux-amd64" -O instgo

    wget "http://arms-apm-eu-central-1.oss-eu-central-1-internal.aliyuncs.com/instgo/instgo-linux-amd64" -O instgo

    EU West 1 (London)

    wget "http://arms-apm-eu-west-1.oss-eu-west-1.aliyuncs.com/instgo/instgo-linux-amd64" -O instgo

    wget "http://arms-apm-eu-west-1.oss-eu-west-1-internal.aliyuncs.com/instgo/instgo-linux-amd64" -O instgo

    US East 1 (Virginia)

    wget "http://arms-apm-us-east-1.oss-us-east-1.aliyuncs.com/instgo/instgo-linux-amd64" -O instgo

    wget "http://arms-apm-us-east-1.oss-us-east-1-internal.aliyuncs.com/instgo/instgo-linux-amd64" -O instgo

    US West 1 (Silicon Valley)

    wget "http://arms-apm-us-west-1.oss-us-west-1.aliyuncs.com/instgo/instgo-linux-amd64" -O instgo

    wget "http://arms-apm-us-west-1.oss-us-west-1-internal.aliyuncs.com/instgo/instgo-linux-amd64" -O instgo

    Linux (ARM64)

    Region

    Public endpoint

    VPC endpoint

    China (Hangzhou)

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

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

    China (Shanghai)

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

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

    China (Qingdao)

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

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

    China (Beijing)

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

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

    China (Zhangjiakou)

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

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

    China (Hohhot)

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

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

    China (Ulanqab)

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

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

    China (Shenzhen)

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

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

    China (Heyuan)

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

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

    China (Guangzhou)

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

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

    China (Chengdu)

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

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

    China (Hong Kong)

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

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

    Singapore

    wget "http://arms-apm-ap-southeast-1.oss-ap-southeast-1.aliyuncs.com/instgo/instgo-linux-arm64" -O instgo

    wget "http://arms-apm-ap-southeast-1.oss-ap-southeast-1-internal.aliyuncs.com/instgo/instgo-linux-arm64" -O instgo

    Asia-Pacific SE 3 (Kuala Lumpur)

    wget "http://arms-apm-ap-southeast-3.oss-ap-southeast-3.aliyuncs.com/instgo/instgo-linux-arm64" -O instgo

    wget "http://arms-apm-ap-southeast-3.oss-ap-southeast-3-internal.aliyuncs.com/instgo/instgo-linux-arm64" -O instgo

    Asia-Pacific SE 5 (Jakarta)

    wget "http://arms-apm-ap-southeast-5.oss-ap-southeast-5.aliyuncs.com/instgo/instgo-linux-arm64" -O instgo

    wget "http://arms-apm-ap-southeast-5.oss-ap-southeast-5-internal.aliyuncs.com/instgo/instgo-linux-arm64" -O instgo

    Asia-Pacific NE 1 (Tokyo)

    wget "http://arms-apm-ap-northeast-1.oss-ap-northeast-1.aliyuncs.com/instgo/instgo-linux-arm64" -O instgo

    wget "http://arms-apm-ap-northeast-1.oss-ap-northeast-1-internal.aliyuncs.com/instgo/instgo-linux-arm64" -O instgo

    EU Central 1 (Frankfurt)

    wget "http://arms-apm-eu-central-1.oss-eu-central-1.aliyuncs.com/instgo/instgo-linux-arm64" -O instgo

    wget "http://arms-apm-eu-central-1.oss-eu-central-1-internal.aliyuncs.com/instgo/instgo-linux-arm64" -O instgo

    EU West 1 (London)

    wget "http://arms-apm-eu-west-1.oss-eu-west-1.aliyuncs.com/instgo/instgo-linux-arm64" -O instgo

    wget "http://arms-apm-eu-west-1.oss-eu-west-1-internal.aliyuncs.com/instgo/instgo-linux-arm64" -O instgo

    US East 1 (Virginia)

    wget "http://arms-apm-us-east-1.oss-us-east-1.aliyuncs.com/instgo/instgo-linux-arm64" -O instgo

    wget "http://arms-apm-us-east-1.oss-us-east-1-internal.aliyuncs.com/instgo/instgo-linux-arm64" -O instgo

    US West 1 (Silicon Valley)

    wget "http://arms-apm-us-west-1.oss-us-west-1.aliyuncs.com/instgo/instgo-linux-arm64" -O instgo

    wget "http://arms-apm-us-west-1.oss-us-west-1-internal.aliyuncs.com/instgo/instgo-linux-arm64" -O instgo

    Darwin (ARM64)

    Region

    Public endpoint

    VPC endpoint

    China (Hangzhou)

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

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

    China (Shanghai)

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

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

    China (Qingdao)

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

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

    China (Beijing)

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

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

    China (Zhangjiakou)

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

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

    China (Hohhot)

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

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

    China (Ulanqab)

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

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

    China (Shenzhen)

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

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

    China (Heyuan)

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

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

    China (Guangzhou)

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

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

    China (Chengdu)

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

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

    China (Hong Kong)

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

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

    Singapore

    wget "http://arms-apm-ap-southeast-1.oss-ap-southeast-1.aliyuncs.com/instgo/instgo-darwin-arm64" -O instgo

    wget "http://arms-apm-ap-southeast-1.oss-ap-southeast-1-internal.aliyuncs.com/instgo/instgo-darwin-arm64" -O instgo

    Asia-Pacific SE 3 (Kuala Lumpur)

    wget "http://arms-apm-ap-southeast-3.oss-ap-southeast-3.aliyuncs.com/instgo/instgo-darwin-arm64" -O instgo

    wget "http://arms-apm-ap-southeast-3.oss-ap-southeast-3-internal.aliyuncs.com/instgo/instgo-darwin-arm64" -O instgo

    Asia-Pacific SE 5 (Jakarta)

    wget "http://arms-apm-ap-southeast-5.oss-ap-southeast-5.aliyuncs.com/instgo/instgo-darwin-arm64" -O instgo

    wget "http://arms-apm-ap-southeast-5.oss-ap-southeast-5-internal.aliyuncs.com/instgo/instgo-darwin-arm64" -O instgo

    Asia-Pacific NE 1 (Tokyo)

    wget "http://arms-apm-ap-northeast-1.oss-ap-northeast-1.aliyuncs.com/instgo/instgo-darwin-arm64" -O instgo

    wget "http://arms-apm-ap-northeast-1.oss-ap-northeast-1-internal.aliyuncs.com/instgo/instgo-darwin-arm64" -O instgo

    EU Central 1 (Frankfurt)

    wget "http://arms-apm-eu-central-1.oss-eu-central-1.aliyuncs.com/instgo/instgo-darwin-arm64" -O instgo

    wget "http://arms-apm-eu-central-1.oss-eu-central-1-internal.aliyuncs.com/instgo/instgo-darwin-arm64" -O instgo

    EU West 1 (London)

    wget "http://arms-apm-eu-west-1.oss-eu-west-1.aliyuncs.com/instgo/instgo-darwin-arm64" -O instgo

    wget "http://arms-apm-eu-west-1.oss-eu-west-1-internal.aliyuncs.com/instgo/instgo-darwin-arm64" -O instgo

    US East 1 (Virginia)

    wget "http://arms-apm-us-east-1.oss-us-east-1.aliyuncs.com/instgo/instgo-darwin-arm64" -O instgo

    wget "http://arms-apm-us-east-1.oss-us-east-1-internal.aliyuncs.com/instgo/instgo-darwin-arm64" -O instgo

    US West 1 (Silicon Valley)

    wget "http://arms-apm-us-west-1.oss-us-west-1.aliyuncs.com/instgo/instgo-darwin-arm64" -O instgo

    wget "http://arms-apm-us-west-1.oss-us-west-1-internal.aliyuncs.com/instgo/instgo-darwin-arm64" -O instgo

    Darwin (AMD64)

    Region

    Public endpoint

    VPC endpoint

    China (Hangzhou)

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

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

    China (Shanghai)

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

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

    China (Qingdao)

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

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

    China (Beijing)

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

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

    China (Zhangjiakou)

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

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

    China (Hohhot)

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

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

    China (Ulanqab)

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

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

    China (Shenzhen)

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

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

    China (Heyuan)

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

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

    China (Guangzhou)

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

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

    China (Chengdu)

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

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

    China (Hong Kong)

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

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

    Singapore

    wget "http://arms-apm-ap-southeast-1.oss-ap-southeast-1.aliyuncs.com/instgo/instgo-darwin-amd64" -O instgo

    wget "http://arms-apm-ap-southeast-1.oss-ap-southeast-1-internal.aliyuncs.com/instgo/instgo-darwin-amd64" -O instgo

    Asia-Pacific SE 3 (Kuala Lumpur)

    wget "http://arms-apm-ap-southeast-3.oss-ap-southeast-3.aliyuncs.com/instgo/instgo-darwin-amd64" -O instgo

    wget "http://arms-apm-ap-southeast-3.oss-ap-southeast-3-internal.aliyuncs.com/instgo/instgo-darwin-amd64" -O instgo

    Asia-Pacific SE 5 (Jakarta)

    wget "http://arms-apm-ap-southeast-5.oss-ap-southeast-5.aliyuncs.com/instgo/instgo-darwin-amd64" -O instgo

    wget "http://arms-apm-ap-southeast-5.oss-ap-southeast-5-internal.aliyuncs.com/instgo/instgo-darwin-amd64" -O instgo

    Asia-Pacific NE 1 (Tokyo)

    wget "http://arms-apm-ap-northeast-1.oss-ap-northeast-1.aliyuncs.com/instgo/instgo-darwin-amd64" -O instgo

    wget "http://arms-apm-ap-northeast-1.oss-ap-northeast-1-internal.aliyuncs.com/instgo/instgo-darwin-amd64" -O instgo

    EU Central 1 (Frankfurt)

    wget "http://arms-apm-eu-central-1.oss-eu-central-1.aliyuncs.com/instgo/instgo-darwin-amd64" -O instgo

    wget "http://arms-apm-eu-central-1.oss-eu-central-1-internal.aliyuncs.com/instgo/instgo-darwin-amd64" -O instgo

    EU West 1 (London)

    wget "http://arms-apm-eu-west-1.oss-eu-west-1.aliyuncs.com/instgo/instgo-darwin-amd64" -O instgo

    wget "http://arms-apm-eu-west-1.oss-eu-west-1-internal.aliyuncs.com/instgo/instgo-darwin-amd64" -O instgo

    US East 1 (Virginia)

    wget "http://arms-apm-us-east-1.oss-us-east-1.aliyuncs.com/instgo/instgo-darwin-amd64" -O instgo

    wget "http://arms-apm-us-east-1.oss-us-east-1-internal.aliyuncs.com/instgo/instgo-darwin-amd64" -O instgo

    US West 1 (Silicon Valley)

    wget "http://arms-apm-us-west-1.oss-us-west-1.aliyuncs.com/instgo/instgo-darwin-amd64" -O instgo

    wget "http://arms-apm-us-west-1.oss-us-west-1-internal.aliyuncs.com/instgo/instgo-darwin-amd64" -O instgo

    Windows (AMD64)

    Region

    Public endpoint

    VPC endpoint

    China (Hangzhou)

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

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

    China (Shanghai)

    wget "http://arms-apm-cn-shanghai.oss-cn-shanghai.aliyuncs.com/instgo/instgo-windows-amd64.exe" -O instgo.exe

    wget "http://arms-apm-cn-shanghai.oss-cn-shanghai-internal.aliyuncs.com/instgo/instgo-windows-amd64.exe" -O instgo.exe

    China (Qingdao)

    wget "http://arms-apm-cn-qingdao.oss-cn-qingdao.aliyuncs.com/instgo/instgo-windows-amd64.exe" -O instgo.exe

    wget "http://arms-apm-cn-qingdao.oss-cn-qingdao-internal.aliyuncs.com/instgo/instgo-windows-amd64.exe" -O instgo.exe

    China (Beijing)

    wget "http://arms-apm-cn-beijing.oss-cn-beijing.aliyuncs.com/instgo/instgo-windows-amd64.exe" -O instgo.exe

    wget "http://arms-apm-cn-beijing.oss-cn-beijing-internal.aliyuncs.com/instgo/instgo-windows-amd64.exe" -O instgo.exe

    China (Zhangjiakou)

    wget "http://arms-apm-cn-zhangjiakou.oss-cn-zhangjiakou.aliyuncs.com/instgo/instgo-windows-amd64.exe" -O instgo.exe

    wget "http://arms-apm-cn-zhangjiakou.oss-cn-zhangjiakou-internal.aliyuncs.com/instgo/instgo-windows-amd64.exe" -O instgo.exe

    China (Hohhot)

    wget "http://arms-apm-cn-huhehaote.oss-cn-huhehaote.aliyuncs.com/instgo/instgo-windows-amd64.exe" -O instgo.exe

    wget "http://arms-apm-cn-huhehaote.oss-cn-huhehaote-internal.aliyuncs.com/instgo/instgo-windows-amd64.exe" -O instgo.exe

    China (Ulanqab)

    wget "http://arms-apm-cn-wulanchabu.oss-cn-wulanchabu.aliyuncs.com/instgo/instgo-windows-amd64.exe" -O instgo.exe

    wget "http://arms-apm-cn-wulanchabu.oss-cn-wulanchabu-internal.aliyuncs.com/instgo/instgo-windows-amd64.exe" -O instgo.exe

    China (Shenzhen)

    wget "http://arms-apm-cn-shenzhen.oss-cn-shenzhen.aliyuncs.com/instgo/instgo-windows-amd64.exe" -O instgo.exe

    wget "http://arms-apm-cn-shenzhen.oss-cn-shenzhen-internal.aliyuncs.com/instgo/instgo-windows-amd64.exe" -O instgo.exe

    China (Heyuan)

    wget "http://arms-apm-cn-heyuan.oss-cn-heyuan.aliyuncs.com/instgo/instgo-windows-amd64.exe" -O instgo.exe
    wget "http://arms-apm-cn-heyuan.oss-cn-heyuan-internal.aliyuncs.com/instgo/instgo-windows-amd64.exe" -O instgo.exe

    China (Guangzhou)

    wget "http://arms-apm-cn-guangzhou.oss-cn-guangzhou.aliyuncs.com/instgo/instgo-windows-amd64.exe" -O instgo.exe

    wget "http://arms-apm-cn-guangzhou.oss-cn-guangzhou-internal.aliyuncs.com/instgo/instgo-windows-amd64.exe" -O instgo.exe

    China (Chengdu)

    wget "http://arms-apm-cn-chengdu.oss-cn-chengdu.aliyuncs.com/instgo/instgo-windows-amd64.exe" -O instgo.exe

    wget "http://arms-apm-cn-chengdu.oss-cn-chengdu-internal.aliyuncs.com/instgo/instgo-windows-amd64.exe" -O instgo.exe

    China (Hong Kong)

    wget "http://arms-apm-cn-hongkong.oss-cn-hongkong.aliyuncs.com/instgo/instgo-windows-amd64.exe" -O instgo.exe

    wget "http://arms-apm-cn-hongkong.oss-cn-hongkong-internal.aliyuncs.com/instgo/instgo-windows-amd64.exe" -O instgo.exe

    Singapore

    wget "http://arms-apm-ap-southeast-1.oss-ap-southeast-1.aliyuncs.com/instgo/instgo-windows-amd64.exe" -O instgo.exe

    wget "http://arms-apm-ap-southeast-1.oss-ap-southeast-1-internal.aliyuncs.com/instgo/instgo-windows-amd64.exe" -O instgo.exe

    Asia-Pacific SE 3 (Kuala Lumpur)

    wget "http://arms-apm-ap-southeast-3.oss-ap-southeast-3.aliyuncs.com/instgo/instgo-windows-amd64.exe" -O instgo.exe

    wget "http://arms-apm-ap-southeast-3.oss-ap-southeast-3-internal.aliyuncs.com/instgo/instgo-windows-amd64.exe" -O instgo.exe

    Asia-Pacific SE 5 (Jakarta)

    wget "http://arms-apm-ap-southeast-5.oss-ap-southeast-5.aliyuncs.com/instgo/instgo-windows-amd64.exe" -O instgo.exe

    wget "http://arms-apm-ap-southeast-5.oss-ap-southeast-5-internal.aliyuncs.com/instgo/instgo-windows-amd64.exe" -O instgo.exe

    Asia-Pacific NE 1 (Tokyo)

    wget "http://arms-apm-ap-northeast-1.oss-ap-northeast-1.aliyuncs.com/instgo/instgo-windows-amd64.exe" -O instgo.exe

    wget "http://arms-apm-ap-northeast-1.oss-ap-northeast-1-internal.aliyuncs.com/instgo/instgo-windows-amd64.exe" -O instgo.exe

    EU Central 1 (Frankfurt)

    wget "http://arms-apm-eu-central-1.oss-eu-central-1.aliyuncs.com/instgo/instgo-windows-amd64.exe" -O instgo.exe

    wget "http://arms-apm-eu-central-1.oss-eu-central-1-internal.aliyuncs.com/instgo/instgo-windows-amd64.exe" -O instgo.exe

    EU West 1 (London)

    wget "http://arms-apm-eu-west-1.oss-eu-west-1.aliyuncs.com/instgo/instgo-windows-amd64.exe" -O instgo.exe

    wget "http://arms-apm-eu-west-1.oss-eu-west-1-internal.aliyuncs.com/instgo/instgo-windows-amd64.exe" -O instgo.exe

    US East 1 (Virginia)

    wget "http://arms-apm-us-east-1.oss-us-east-1.aliyuncs.com/instgo/instgo-windows-amd64.exe" -O instgo.exe

    wget "http://arms-apm-us-east-1.oss-us-east-1-internal.aliyuncs.com/instgo/instgo-windows-amd64.exe" -O instgo.exe

    US West 1 (Silicon Valley)

    wget "http://arms-apm-us-west-1.oss-us-west-1.aliyuncs.com/instgo/instgo-windows-amd64.exe" -O instgo.exe

    wget "http://arms-apm-us-west-1.oss-us-west-1-internal.aliyuncs.com/instgo/instgo-windows-amd64.exe" -O instgo.exe

  2. Add executable permissions to the compile tool.

    Linux/Darwin

    # Add executable permissions.
    chmod +x instgo

    Windows

    You do not need to add executable permissions in Windows.

  3. Obtain the LicenseKey and configure compile parameters.

    Important

    If you skip this step, instgo enters dev mode and installs the latest version of the ARMS probe by default. To deploy in a production environment, configure the following parameters.

    1. You can obtain the LicenseKey by calling the DescribeTraceLicenseKey OpenAPI operation.

      On the DescribeTraceLicenseKey documentation page, click Debug. Select a region and then click Initiate Call to obtain the LicenseKey.

      image

    2. After you obtain the LicenseKey, use the set command to configure the compile parameters.

      instgo set --licenseKey=${YourLicenseKey} --regionId=${YourRegionId} --dev=false
  4. Add instgo as a prefix to your original compile command and run it.

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

    If you use go install to compile your project, you can also add instgo as a prefix to your original compile command and run it.

  5. Use the binary file compiled in the previous step to build an image.

Related information

  • During the first compilation, the probe is downloaded to the /opt directory (C:\ProgramData for Windows) by default. If the directory does not have the required permissions, run instgo set --cacheDir="./" to set the cache directory to the current directory, or run the sudo -E command to perform the compilation. For Windows, you must run the compile command with administrator permissions.

  • If the compilation is forcibly stopped or exits unexpectedly, residual files may remain. To clean up residual files from the Go probe compilation, see Clean up residual files from Go probe compilation.

Method 2: Non-intrusive build of the Go application image

Note

This method is supported only for Go 1.23 and earlier versions.

Replace the base image in the Go binary file build stage with an ARMS compile image to non-intrusively build the Go application image.

ARMS provides compile images for AMD64 and ARM64 architectures on Alpine Linux and Debian Linux.

Click to view the ARMS compile image addresses for each architecture.

Alpine Linux (AMD64)

Region

VPC endpoint

Public endpoint

China (Hangzhou)

registry-cn-hangzhou-vpc.ack.aliyuncs.com/acs/golangbuilder-alpine-linux-amd64:0.0.1

registry-cn-hangzhou.ack.aliyuncs.com/acs/golangbuilder-alpine-linux-amd64:0.0.1

China (Shanghai)

registry-cn-shanghai-vpc.ack.aliyuncs.com/acs/golangbuilder-alpine-linux-amd64:0.0.1

registry-cn-shanghai.ack.aliyuncs.com/acs/golangbuilder-alpine-linux-amd64:0.0.1

China (Qingdao)

registry-cn-qingdao-vpc.ack.aliyuncs.com/acs/golangbuilder-alpine-linux-amd64:0.0.1

registry-cn-qingdao.ack.aliyuncs.com/acs/golangbuilder-alpine-linux-amd64:0.0.1

China (Beijing)

registry-cn-beijing-vpc.ack.aliyuncs.com/acs/golangbuilder-alpine-linux-amd64:0.0.1

registry-cn-beijing.ack.aliyuncs.com/acs/golangbuilder-alpine-linux-amd64:0.0.1

China (Zhangjiakou)

registry-cn-zhangjiakou-vpc.ack.aliyuncs.com/acs/golangbuilder-alpine-linux-amd64:0.0.1

registry-cn-zhangjiakou.ack.aliyuncs.com/acs/golangbuilder-alpine-linux-amd64:0.0.1

China (Hohhot)

registry-cn-huhehaote-vpc.ack.aliyuncs.com/acs/golangbuilder-alpine-linux-amd64:0.0.1

registry-cn-huhehaote.ack.aliyuncs.com/acs/golangbuilder-alpine-linux-amd64:0.0.1

China (Ulanqab)

registry-cn-wulanchabu-acdr-1-vpc.ack.aliyuncs.com/acs/golangbuilder-alpine-linux-amd64:0.0.1

registry-cn-wulanchabu-acdr-1.ack.aliyuncs.com/acs/golangbuilder-alpine-linux-amd64:0.0.1

China (Shenzhen)

registry-cn-shenzhen-vpc.ack.aliyuncs.com/acs/golangbuilder-alpine-linux-amd64:0.0.1

registry-cn-shenzhen.ack.aliyuncs.com/acs/golangbuilder-alpine-linux-amd64:0.0.1

China (Heyuan)

registry-cn-heyuan-vpc.ack.aliyuncs.com/acs/golangbuilder-alpine-linux-amd64:0.0.1

registry-cn-heyuan.ack.aliyuncs.com/acs/golangbuilder-alpine-linux-amd64:0.0.1

China (Guangzhou)

registry-cn-guangzhou-vpc.ack.aliyuncs.com/acs/golangbuilder-alpine-linux-amd64:0.0.1

registry-cn-guangzhou.ack.aliyuncs.com/acs/golangbuilder-alpine-linux-amd64:0.0.1

China (Chengdu)

registry-cn-chengdu-vpc.ack.aliyuncs.com/acs/golangbuilder-alpine-linux-amd64:0.0.1

registry-cn-chengdu.ack.aliyuncs.com/acs/golangbuilder-alpine-linux-amd64:0.0.1

China (Hong Kong)

registry-cn-hongkong-vpc.ack.aliyuncs.com/acs/golangbuilder-alpine-linux-amd64:0.0.1

registry-cn-hongkong.ack.aliyuncs.com/acs/golangbuilder-alpine-linux-amd64:0.0.1

Singapore

registry-ap-southeast-1-vpc.ack.aliyuncs.com/acs/golangbuilder-alpine-linux-amd64:0.0.1

registry-ap-southeast-1.ack.aliyuncs.com/acs/golangbuilder-alpine-linux-amd64:0.0.1

Asia-Pacific SE 3 (Kuala Lumpur)

registry-ap-southeast-3-vpc.ack.aliyuncs.com/acs/golangbuilder-alpine-linux-amd64:0.0.1

registry-ap-southeast-3.ack.aliyuncs.com/acs/golangbuilder-alpine-linux-amd64:0.0.1

Asia-Pacific SE 5 (Jakarta)

registry-ap-southeast-5-vpc.ack.aliyuncs.com/acs/golangbuilder-alpine-linux-amd64:0.0.1

registry-ap-southeast-5.ack.aliyuncs.com/acs/golangbuilder-alpine-linux-amd64:0.0.1

Asia-Pacific NE 1 (Tokyo)

registry-ap-northeast-1-vpc.ack.aliyuncs.com/acs/golangbuilder-alpine-linux-amd64:0.0.1

registry-ap-northeast-1.ack.aliyuncs.com/acs/golangbuilder-alpine-linux-amd64:0.0.1

EU Central 1 (Frankfurt)

registry-eu-central-1-vpc.ack.aliyuncs.com/acs/golangbuilder-alpine-linux-amd64:0.0.1

registry-eu-central-1.ack.aliyuncs.com/acs/golangbuilder-alpine-linux-amd64:0.0.1

EU West 1 (London)

registry-eu-west-1-vpc.ack.aliyuncs.com/acs/golangbuilder-alpine-linux-amd64:0.0.1

registry-eu-west-1.ack.aliyuncs.com/acs/golangbuilder-alpine-linux-amd64:0.0.1

US East 1 (Virginia)

registry-us-east-1-vpc.ack.aliyuncs.com/acs/golangbuilder-alpine-linux-amd64:0.0.1

registry-us-east-1.ack.aliyuncs.com/acs/golangbuilder-alpine-linux-amd64:0.0.1

US West 1 (Silicon Valley)

registry-us-west-1-vpc.ack.aliyuncs.com/acs/golangbuilder-alpine-linux-amd64:0.0.1

registry-us-west-1.ack.aliyuncs.com/acs/golangbuilder-alpine-linux-amd64:0.0.1

Alpine Linux (ARM64)

Region

VPC endpoint

Public endpoint

China (Hangzhou)

registry-cn-hangzhou-vpc.ack.aliyuncs.com/acs/golangbuilder-alpine-linux-arm64:0.0.1

registry-cn-hangzhou.ack.aliyuncs.com/acs/golangbuilder-alpine-linux-arm64:0.0.1

China (Shanghai)

registry-cn-shanghai-vpc.ack.aliyuncs.com/acs/golangbuilder-alpine-linux-arm64:0.0.1

registry-cn-shanghai.ack.aliyuncs.com/acs/golangbuilder-alpine-linux-arm64:0.0.1

China (Qingdao)

registry-cn-qingdao-vpc.ack.aliyuncs.com/acs/golangbuilder-alpine-linux-arm64:0.0.1

registry-cn-qingdao.ack.aliyuncs.com/acs/golangbuilder-alpine-linux-arm64:0.0.1

China (Beijing)

registry-cn-beijing-vpc.ack.aliyuncs.com/acs/golangbuilder-alpine-linux-arm64:0.0.1

registry-cn-beijing.ack.aliyuncs.com/acs/golangbuilder-alpine-linux-arm64:0.0.1

China (Zhangjiakou)

registry-cn-zhangjiakou-vpc.ack.aliyuncs.com/acs/golangbuilder-alpine-linux-arm64:0.0.1

registry-cn-zhangjiakou.ack.aliyuncs.com/acs/golangbuilder-alpine-linux-arm64:0.0.1

China (Hohhot)

registry-cn-huhehaote-vpc.ack.aliyuncs.com/acs/golangbuilder-alpine-linux-arm64:0.0.1

registry-cn-huhehaote.ack.aliyuncs.com/acs/golangbuilder-alpine-linux-arm64:0.0.1

China (Ulanqab)

registry-cn-wulanchabu-acdr-1-vpc.ack.aliyuncs.com/acs/golangbuilder-alpine-linux-arm64:0.0.1

registry-cn-wulanchabu-acdr-1.ack.aliyuncs.com/acs/golangbuilder-alpine-linux-arm64:0.0.1

China (Shenzhen)

registry-cn-shenzhen-vpc.ack.aliyuncs.com/acs/golangbuilder-alpine-linux-arm64:0.0.1

registry-cn-shenzhen.ack.aliyuncs.com/acs/golangbuilder-alpine-linux-arm64:0.0.1

China (Heyuan)

registry-cn-heyuan-vpc.ack.aliyuncs.com/acs/golangbuilder-alpine-linux-arm64:0.0.1

registry-cn-heyuan.ack.aliyuncs.com/acs/golangbuilder-alpine-linux-arm64:0.0.1

China (Guangzhou)

registry-cn-guangzhou-vpc.ack.aliyuncs.com/acs/golangbuilder-alpine-linux-arm64:0.0.1

registry-cn-guangzhou.ack.aliyuncs.com/acs/golangbuilder-alpine-linux-arm64:0.0.1

China (Chengdu)

registry-cn-chengdu-vpc.ack.aliyuncs.com/acs/golangbuilder-alpine-linux-arm64:0.0.1

registry-cn-chengdu.ack.aliyuncs.com/acs/golangbuilder-alpine-linux-arm64:0.0.1

China (Hong Kong)

registry-cn-hongkong-vpc.ack.aliyuncs.com/acs/golangbuilder-alpine-linux-arm64:0.0.1

registry-cn-hongkong.ack.aliyuncs.com/acs/golangbuilder-alpine-linux-arm64:0.0.1

Singapore

registry-ap-southeast-1-vpc.ack.aliyuncs.com/acs/golangbuilder-alpine-linux-arm64:0.0.1

registry-ap-southeast-1.ack.aliyuncs.com/acs/golangbuilder-alpine-linux-arm64:0.0.1

Asia-Pacific SE 3 (Kuala Lumpur)

registry-ap-southeast-3-vpc.ack.aliyuncs.com/acs/golangbuilder-alpine-linux-arm64:0.0.1

registry-ap-southeast-3.ack.aliyuncs.com/acs/golangbuilder-alpine-linux-arm64:0.0.1

Asia-Pacific SE 5 (Jakarta)

registry-ap-southeast-5-vpc.ack.aliyuncs.com/acs/golangbuilder-alpine-linux-arm64:0.0.1

registry-ap-southeast-5.ack.aliyuncs.com/acs/golangbuilder-alpine-linux-arm64:0.0.1

Asia-Pacific NE 1 (Tokyo)

registry-ap-northeast-1-vpc.ack.aliyuncs.com/acs/golangbuilder-alpine-linux-arm64:0.0.1

registry-ap-northeast-1.ack.aliyuncs.com/acs/golangbuilder-alpine-linux-arm64:0.0.1

EU Central 1 (Frankfurt)

registry-eu-central-1-vpc.ack.aliyuncs.com/acs/golangbuilder-alpine-linux-arm64:0.0.1

registry-eu-central-1.ack.aliyuncs.com/acs/golangbuilder-alpine-linux-arm64:0.0.1

EU West 1 (London)

registry-eu-west-1-vpc.ack.aliyuncs.com/acs/golangbuilder-alpine-linux-arm64:0.0.1

registry-eu-west-1.ack.aliyuncs.com/acs/golangbuilder-alpine-linux-arm64:0.0.1

US East 1 (Virginia)

registry-us-east-1-vpc.ack.aliyuncs.com/acs/golangbuilder-alpine-linux-arm64:0.0.1

registry-us-east-1.ack.aliyuncs.com/acs/golangbuilder-alpine-linux-arm64:0.0.1

US West 1 (Silicon Valley)

registry-us-west-1-vpc.ack.aliyuncs.com/acs/golangbuilder-alpine-linux-arm64:0.0.1

registry-us-west-1.ack.aliyuncs.com/acs/golangbuilder-alpine-linux-arm64:0.0.1

Debian Linux (AMD64)

Region

VPC endpoint

Public endpoint

China (Hangzhou)

registry-cn-hangzhou-vpc.ack.aliyuncs.com/acs/golangbuilder-linux-amd64:0.0.1

registry-cn-hangzhou.ack.aliyuncs.com/acs/golangbuilder-linux-amd64:0.0.1

China (Shanghai)

registry-cn-shanghai-vpc.ack.aliyuncs.com/acs/golangbuilder-linux-amd64:0.0.1

registry-cn-shanghai.ack.aliyuncs.com/acs/golangbuilder-linux-amd64:0.0.1

China (Qingdao)

registry-cn-qingdao-vpc.ack.aliyuncs.com/acs/golangbuilder-linux-amd64:0.0.1

registry-cn-qingdao.ack.aliyuncs.com/acs/golangbuilder-linux-amd64:0.0.1

China (Beijing)

registry-cn-beijing-vpc.ack.aliyuncs.com/acs/golangbuilder-linux-amd64:0.0.1

registry-cn-beijing.ack.aliyuncs.com/acs/golangbuilder-linux-amd64:0.0.1

China (Zhangjiakou)

registry-cn-zhangjiakou-vpc.ack.aliyuncs.com/acs/golangbuilder-linux-amd64:0.0.1

registry-cn-zhangjiakou.ack.aliyuncs.com/acs/golangbuilder-linux-amd64:0.0.1

China (Hohhot)

registry-cn-huhehaote-vpc.ack.aliyuncs.com/acs/golangbuilder-linux-amd64:0.0.1

registry-cn-huhehaote.ack.aliyuncs.com/acs/golangbuilder-linux-amd64:0.0.1

China (Ulanqab)

registry-cn-wulanchabu-acdr-1-vpc.ack.aliyuncs.com/acs/golangbuilder-linux-amd64:0.0.1

registry-cn-wulanchabu-acdr-1.ack.aliyuncs.com/acs/golangbuilder-linux-amd64:0.0.1

China (Shenzhen)

registry-cn-shenzhen-vpc.ack.aliyuncs.com/acs/golangbuilder-linux-amd64:0.0.1

registry-cn-shenzhen.ack.aliyuncs.com/acs/golangbuilder-linux-amd64:0.0.1

China (Heyuan)

registry-cn-heyuan-vpc.ack.aliyuncs.com/acs/golangbuilder-linux-amd64:0.0.1

registry-cn-heyuan.ack.aliyuncs.com/acs/golangbuilder-linux-amd64:0.0.1

China (Guangzhou)

registry-cn-guangzhou-vpc.ack.aliyuncs.com/acs/golangbuilder-linux-amd64:0.0.1

registry-cn-guangzhou.ack.aliyuncs.com/acs/golangbuilder-linux-amd64:0.0.1

China (Chengdu)

registry-cn-chengdu-vpc.ack.aliyuncs.com/acs/golangbuilder-linux-amd64:0.0.1

registry-cn-chengdu.ack.aliyuncs.com/acs/golangbuilder-linux-amd64:0.0.1

China (Hong Kong)

registry-cn-hongkong-vpc.ack.aliyuncs.com/acs/golangbuilder-linux-amd64:0.0.1

registry-cn-hongkong.ack.aliyuncs.com/acs/golangbuilder-linux-amd64:0.0.1

Singapore

registry-ap-southeast-1-vpc.ack.aliyuncs.com/acs/golangbuilder-linux-amd64:0.0.1

registry-ap-southeast-1.ack.aliyuncs.com/acs/golangbuilder-linux-amd64:0.0.1

Asia-Pacific SE 3 (Kuala Lumpur)

registry-ap-southeast-3-vpc.ack.aliyuncs.com/acs/golangbuilder-linux-amd64:0.0.1

registry-ap-southeast-3.ack.aliyuncs.com/acs/golangbuilder-linux-amd64:0.0.1

Asia-Pacific SE 5 (Jakarta)

registry-ap-southeast-5-vpc.ack.aliyuncs.com/acs/golangbuilder-linux-amd64:0.0.1

registry-ap-southeast-5.ack.aliyuncs.com/acs/golangbuilder-linux-amd64:0.0.1

Asia-Pacific NE 1 (Tokyo)

registry-ap-northeast-1-vpc.ack.aliyuncs.com/acs/golangbuilder-linux-amd64:0.0.1

registry-ap-northeast-1.ack.aliyuncs.com/acs/golangbuilder-linux-amd64:0.0.1

EU Central 1 (Frankfurt)

registry-eu-central-1-vpc.ack.aliyuncs.com/acs/golangbuilder-linux-amd64:0.0.1

registry-eu-central-1.ack.aliyuncs.com/acs/golangbuilder-linux-amd64:0.0.1

EU West 1 (London)

registry-eu-west-1-vpc.ack.aliyuncs.com/acs/golangbuilder-linux-amd64:0.0.1

registry-eu-west-1.ack.aliyuncs.com/acs/golangbuilder-linux-amd64:0.0.1

US East 1 (Virginia)

registry-us-east-1-vpc.ack.aliyuncs.com/acs/golangbuilder-linux-amd64:0.0.1

registry-us-east-1.ack.aliyuncs.com/acs/golangbuilder-linux-amd64:0.0.1

US West 1 (Silicon Valley)

registry-us-west-1-vpc.ack.aliyuncs.com/acs/golangbuilder-linux-amd64:0.0.1

registry-us-west-1.ack.aliyuncs.com/acs/golangbuilder-linux-amd64:0.0.1

Debian Linux (ARM64)

Region

VPC endpoint

Public endpoint

China (Hangzhou)

registry-cn-hangzhou-vpc.ack.aliyuncs.com/acs/golangbuilder-linux-arm64:0.0.1

registry-cn-hangzhou.ack.aliyuncs.com/acs/golangbuilder-linux-arm64:0.0.1

China (Shanghai)

registry-cn-shanghai-vpc.ack.aliyuncs.com/acs/golangbuilder-linux-arm64:0.0.1

registry-cn-shanghai.ack.aliyuncs.com/acs/golangbuilder-linux-arm64:0.0.1

China (Qingdao)

registry-cn-qingdao-vpc.ack.aliyuncs.com/acs/golangbuilder-linux-arm64:0.0.1

registry-cn-qingdao.ack.aliyuncs.com/acs/golangbuilder-linux-arm64:0.0.1

China (Beijing)

registry-cn-beijing-vpc.ack.aliyuncs.com/acs/golangbuilder-linux-arm64:0.0.1

registry-cn-beijing.ack.aliyuncs.com/acs/golangbuilder-linux-arm64:0.0.1

China (Zhangjiakou)

registry-cn-zhangjiakou-vpc.ack.aliyuncs.com/acs/golangbuilder-linux-arm64:0.0.1

registry-cn-zhangjiakou.ack.aliyuncs.com/acs/golangbuilder-linux-arm64:0.0.1

China (Hohhot)

registry-cn-huhehaote-vpc.ack.aliyuncs.com/acs/golangbuilder-linux-arm64:0.0.1

registry-cn-huhehaote.ack.aliyuncs.com/acs/golangbuilder-linux-arm64:0.0.1

China (Ulanqab)

registry-cn-wulanchabu-acdr-1-vpc.ack.aliyuncs.com/acs/golangbuilder-linux-arm64:0.0.1

registry-cn-wulanchabu-acdr-1.ack.aliyuncs.com/acs/golangbuilder-linux-arm64:0.0.1

China (Shenzhen)

registry-cn-shenzhen-vpc.ack.aliyuncs.com/acs/golangbuilder-linux-arm64:0.0.1

registry-cn-shenzhen.ack.aliyuncs.com/acs/golangbuilder-linux-arm64:0.0.1

China (Heyuan)

registry-cn-heyuan-vpc.ack.aliyuncs.com/acs/golangbuilder-linux-arm64:0.0.1

registry-cn-heyuan.ack.aliyuncs.com/acs/golangbuilder-linux-arm64:0.0.1

China (Guangzhou)

registry-cn-guangzhou-vpc.ack.aliyuncs.com/acs/golangbuilder-linux-arm64:0.0.1

registry-cn-guangzhou.ack.aliyuncs.com/acs/golangbuilder-linux-arm64:0.0.1

China (Chengdu)

registry-cn-chengdu-vpc.ack.aliyuncs.com/acs/golangbuilder-linux-arm64:0.0.1

registry-cn-chengdu.ack.aliyuncs.com/acs/golangbuilder-linux-arm64:0.0.1

China (Hong Kong)

registry-cn-hongkong-vpc.ack.aliyuncs.com/acs/golangbuilder-linux-arm64:0.0.1

registry-cn-hongkong.ack.aliyuncs.com/acs/golangbuilder-linux-arm64:0.0.1

Singapore

registry-ap-southeast-1-vpc.ack.aliyuncs.com/acs/golangbuilder-linux-arm64:0.0.1

registry-ap-southeast-1.ack.aliyuncs.com/acs/golangbuilder-linux-arm64:0.0.1

Asia-Pacific SE 3 (Kuala Lumpur)

registry-ap-southeast-3-vpc.ack.aliyuncs.com/acs/golangbuilder-linux-arm64:0.0.1

registry-ap-southeast-3.ack.aliyuncs.com/acs/golangbuilder-linux-arm64:0.0.1

Asia-Pacific SE 5 (Jakarta)

registry-ap-southeast-5-vpc.ack.aliyuncs.com/acs/golangbuilder-linux-arm64:0.0.1

registry-ap-southeast-5.ack.aliyuncs.com/acs/golangbuilder-linux-arm64:0.0.1

Asia-Pacific NE 1 (Tokyo)

registry-ap-northeast-1-vpc.ack.aliyuncs.com/acs/golangbuilder-linux-arm64:0.0.1

registry-ap-northeast-1.ack.aliyuncs.com/acs/golangbuilder-linux-arm64:0.0.1

EU Central 1 (Frankfurt)

registry-eu-central-1-vpc.ack.aliyuncs.com/acs/golangbuilder-linux-arm64:0.0.1

registry-eu-central-1.ack.aliyuncs.com/acs/golangbuilder-linux-arm64:0.0.1

EU West 1 (London)

registry-eu-west-1-vpc.ack.aliyuncs.com/acs/golangbuilder-linux-arm64:0.0.1

registry-eu-west-1.ack.aliyuncs.com/acs/golangbuilder-linux-arm64:0.0.1

US East 1 (Virginia)

registry-us-east-1-vpc.ack.aliyuncs.com/acs/golangbuilder-linux-arm64:0.0.1

registry-us-east-1.ack.aliyuncs.com/acs/golangbuilder-linux-arm64:0.0.1

US West 1 (Silicon Valley)

registry-us-west-1-vpc.ack.aliyuncs.com/acs/golangbuilder-linux-arm64:0.0.1

registry-us-west-1.ack.aliyuncs.com/acs/golangbuilder-linux-arm64:0.0.1

For example, the following Dockerfile shows how to use Docker multi-stage builds to build a Go application image:

# stage 1
FROM golang:1.22-alpine3.19 as builder
  
RUN --mount=type=ssh \
  go build -v -buildmode=pie -ldflags "-linkmode external -extldflags -static" \
  -o /workspace/demo
# stage 2
FROM alpine
  
COPY --from=builder /workspace/demo /demo
# Specify the default startup command.
CMD ["/demo"]

The example Dockerfile has two stages:

  1. The first stage builds the Go binary file.

  2. The second stage copies the binary file from the first stage into the runtime image and uses it to build the runtime image for the Go application.

Replace the base image in the Go binary file build stage with an ARMS compile image. All other commands can remain the same. The following code shows the modified Dockerfile:

# stage 1
# Replace with the ARMS compile image. The rest remains the same.
# Replace with the image of the corresponding region as needed.
FROM registry-cn-hangzhou.ack.aliyuncs.com/acs/golangbuilder-alpine-linux-amd64:0.0.1 as builder
  
RUN --mount=type=ssh \
  go build -v -buildmode=pie -ldflags "-linkmode external -extldflags -static" \
  -o /workspace/demo
# stage 2
FROM alpine
  
COPY --from=builder /workspace/demo /demo
# Specify the default startup command.
CMD ["/demo"]

Step 2: Install Helm 3

Step 3: Install the agent

Application Monitoring supports stateless applications (deployments) and stateful applications (StatefulSets). The integration method is the same for both application types. This section uses a stateless application (deployment) as an example.

  1. Run the following wget command to download the ack-onepilot installation package.

     wget 'https://aliacs-app-catalog.oss-cn-hangzhou.aliyuncs.com/charts-incubator/ack-onepilot-5.1.1.tgz'
  2. Run the following command to decompress the ack-onepilot installation package.

    tar xvf ack-onepilot-5.1.1.tgz                 
  3. Edit the values.yaml file in the installation package. Modify the following parameters as needed and save the file.

    registry: registry-__ACK_REGION_ID__.ack.aliyuncs.com/acs/
    cluster_id: __ACK_CLUSTER_ID__
    accessKey: __ACCESSKEY__
    accessKeySecret: __ACCESSKEY_SECRET__
    uid: "__ACK_UID__"
    region_id: __ACK_REGION_ID__
    • registry: The address of the ack-onepilot image.

    • cluster_id: A custom ID for the Kubernetes cluster. This ID must be unique. The recommended format is <uid>-<clusterid>.

    • accessKey and accessKeySecret: The AccessKey ID and AccessKey secret of your Alibaba Cloud account. For more information about how to obtain an AccessKey pair, see Create an AccessKey pair.

      Important

      Ensure that the AliyunARMSFullAccess and AliyunSTSAssumeRoleAccess permissions are granted to the Alibaba Cloud account.

    • uid: The ID of your Alibaba Cloud account. To obtain the ID, hover over your profile picture in the upper-right corner of the Alibaba Cloud Management Console.

    • region_id: The ID of the Alibaba Cloud region. For more information about the regions that support Application Monitoring, see Supported regions.

  4. Run the following command to install ack-onepilot.

    Run this command from outside the ack-onepilot installation package directory.

    helm3 upgrade --install ack-onepilot ack-onepilot --namespace ack-onepilot --create-namespace

Step 4: Modify the application's YAML file

  1. Run the following command to view the YAML file of the target stateless application (deployment).

    kubectl get deployment {deployment-name} -o yaml                            
    Note

    If you do not know the {deployment-name}, run the following command to view all stateless applications (deployments). Find the target deployment in the results, and then view the YAML file of the target deployment.

    kubectl get deployments --all-namespace                
  2. Edit the YAML file of the target stateless application (deployment).

    kubectl edit deployment {Deployment-name} -o yaml                        
  3. In the YAML file, add the following content under the spec.template.metadata level.

    labels:
      aliyun.com/app-language: "golang" # Required for Go applications. This label indicates that the application is a Go application.
      armsPilotAutoEnable: "on"
      armsPilotCreateAppName: "<your-deployment-name>"    # Replace <your-deployment-name> with your application name.

    If you want to create a new stateless application (deployment) in a Kubernetes environment and connect it to ARMS, you can use the following complete YAML file as a reference:

    View the complete YAML file

    apiVersion: apps/v1
    kind: Deployment
    metadata:
      labels:
        app: otel-go-client
      name: otel-go-client
      namespace: default
    spec:
      progressDeadlineSeconds: 600
      replicas: 1
      revisionHistoryLimit: 10
      selector:
        matchLabels:
          app: otel-go-client
      strategy:
        rollingUpdate:
          maxSurge: 25%
          maxUnavailable: 25%
        type: RollingUpdate
      template:
        metadata:
          labels:
            aliyun.com/app-language: golang
            armsPilotAutoEnable: 'on'
            armsPilotCreateAppName: otel-go-client
            app: otel-go-client
        spec:
          containers:
            - image: registry.cn-hangzhou.aliyuncs.com/private-mesh/hellob:otel-client-arms-go-test-0.0.1
              imagePullPolicy: Always
              name: client
              resources:
                requests:
                  cpu: 250m
                  memory: 300Mi
              terminationMessagePath: /dev/termination-log
              terminationMessagePolicy: File
          dnsPolicy: ClusterFirst
          restartPolicy: Always
          schedulerName: default-scheduler
          securityContext: {}
          terminationGracePeriodSeconds: 30
    
    ---
    
    apiVersion: apps/v1
    kind: Deployment
    metadata:
      labels:
        app: otel-go-server
      name: otel-go-server
      namespace: default
    spec:
      progressDeadlineSeconds: 600
      replicas: 1
      revisionHistoryLimit: 10
      selector:
        matchLabels:
          app: otel-go-server
      strategy:
        rollingUpdate:
          maxSurge: 25%
          maxUnavailable: 25%
        type: RollingUpdate
      template:
        metadata:
          labels:
            app: otel-go-server
            aliyun.com/app-language: golang
            armsPilotAutoEnable: 'on'
            armsPilotCreateAppName: otel-go-server
        spec:
          containers:
            - image: registry.cn-hangzhou.aliyuncs.com/private-mesh/hellob:otel-server-arms-go-test-0.0.1
              imagePullPolicy: Always
              name: server
              resources:
                requests:
                  cpu: 250m
                  memory: 300Mi
              terminationMessagePath: /dev/termination-log
              terminationMessagePolicy: File
          dnsPolicy: ClusterFirst
          restartPolicy: Always
          schedulerName: default-scheduler
          securityContext: {}
          terminationGracePeriodSeconds: 30
    
    ---
    
    apiVersion: v1
    kind: Service
    metadata:
      labels:
        app: otel-go-server
      name: otel-server
      namespace: default
    spec:
      internalTrafficPolicy: Cluster
      ipFamilies:
        - IPv4
      ipFamilyPolicy: SingleStack
      ports:
        - name: http
          port: 9000
          protocol: TCP
          targetPort: 9000
      selector:
        app: otel-go-server
      sessionAffinity: None
      type: ClusterIP

Result

The integration is successful if, after about one minute, the Golang application appears in the ARMS console on the Application Monitoring > Application List page and reports data.

image.png