文档

手动安装Golang探针

更新时间:

为Golang应用安装探针后,ARMS即可开始监控Golang应用,您可以查看应用拓扑、调用链路、SQL分析等一系列监控数据。本文介绍如何为Go应用手动安装探针。

说明
  • 对于部署在Kubernetes环境的应用,不推荐手动安装探针,建议通过安装组件的方式接入ARMS。具体操作,请参见容器服务ACK通过ack-onepilot组件安装Go探针

  • 如果您在使用Golang探针过程中有任何问题,欢迎通过钉钉答疑群(群号:35568145)与我们联系。

前提条件

  • 确保您的编译环境和公网或阿里云内网连通,且编译环境所在安全组已开放8080、9990、80、443的TCP出方向权限。

  • 检查您的网络环境。具体要求,请参见Golang应用监控网络配置

  • 检查您的编译环境操作系统和架构,以及Go版本和框架版本。具体要求,请参见Golang探针兼容性要求

步骤一:编译Go二进制文件

  1. 使用wget命令下载编译工具,请根据编译环境和编译机器所在地域,选择对应的下载地址。

    说明

    各地域下载的编译工具是相同的,如果您的公网环境可以访问OSS地址,可以直接使用对应操作系统和架构的杭州公网地址获取编译工具。

    展开查看各地域对应的下载命令

    Linux(AMD64)

    地域

    公网地址

    VPC地址

    华东1(杭州)

    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

    华东2(上海)

    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

    华北1(青岛)

    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

    华北2(北京)

    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

    华北3(张家口)

    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

    华北5(呼和浩特)

    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

    华北6(乌兰察布)

    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

    华南1(深圳)

    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

    华南2(河源)

    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

    华南3(广州)

    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

    西南1(成都)

    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

    中国(香港)

    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

    新加坡

    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

    亚太东南2(悉尼)

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

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

    亚太东南3(吉隆坡)

    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

    亚太东南5(雅加达)

    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

    亚太东北1(东京)

    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

    欧洲中部1(法兰克福)

    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

    欧洲西部1(伦敦)

    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

    美国东部1(弗吉尼亚)

    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

    美国西部1(硅谷)

    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

    亚太南部1(孟买)

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

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

    华东1金融云

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

    华东2金融云

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

    华南1金融云

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

    政务云

    wget "http://arms-apm-cn-north-2-gov-1.oss-cn-north-2-gov-1.aliyuncs.com/instgo/instgo-linux-amd64" -O instgo

    wget "http://arms-apm-cn-north-2-gov-1.oss-cn-north-2-gov-1-internal.aliyuncs.com/instgo/instgo-linux-amd64" -O instgo

    Linux(ARM64)

    地域

    公网地址

    VPC地址

    华东1(杭州)

    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

    华东2(上海)

    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

    华北1(青岛)

    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

    华北2(北京)

    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

    华北3(张家口)

    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

    华北5(呼和浩特)

    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

    华北6(乌兰察布)

    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

    华南1(深圳)

    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

    华南2(河源)

    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

    华南3(广州)

    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

    西南1(成都)

    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

    中国(香港)

    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

    新加坡

    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

    亚太东南2(悉尼)

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

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

    亚太东南3(吉隆坡)

    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

    亚太东南5(雅加达)

    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

    亚太东北1(东京)

    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

    欧洲中部1(法兰克福)

    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

    欧洲西部1(伦敦)

    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

    美国东部1(弗吉尼亚)

    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

    美国西部1(硅谷)

    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

    亚太南部1(孟买)

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

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

    华东1金融云

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

    华东2金融云

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

    华南1金融云

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

    政务云

    wget "http://arms-apm-cn-north-2-gov-1.oss-cn-north-2-gov-1.aliyuncs.com/instgo/instgo-linux-arm64" -O instgo

    wget "http://arms-apm-cn-north-2-gov-1.oss-cn-north-2-gov-1-internal.aliyuncs.com/instgo/instgo-linux-arm64" -O instgo

    Darwin(ARM64)

    地域

    公网地址

    VPC地址

    华东1(杭州)

    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

    华东2(上海)

    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

    华北1(青岛)

    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

    华北2(北京)

    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

    华北3(张家口)

    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

    华北5(呼和浩特)

    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

    华北6(乌兰察布)

    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

    华南1(深圳)

    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

    华南2(河源)

    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

    华南3(广州)

    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

    西南1(成都)

    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

    中国(香港)

    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

    新加坡

    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

    亚太东南2(悉尼)

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

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

    亚太东南3(吉隆坡)

    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

    亚太东南5(雅加达)

    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

    亚太东北1(东京)

    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

    欧洲中部1(法兰克福)

    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

    欧洲西部1(伦敦)

    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

    美国东部1(弗吉尼亚)

    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

    美国西部1(硅谷)

    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

    亚太南部1(孟买)

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

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

    华东1金融云

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

    华东2金融云

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

    华南1金融云

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

    政务云

    wget "http://arms-apm-cn-north-2-gov-1.oss-cn-north-2-gov-1.aliyuncs.com/instgo/instgo-darwin-arm64" -O instgo

    wget "http://arms-apm-cn-north-2-gov-1.oss-cn-north-2-gov-1-internal.aliyuncs.com/instgo/instgo-darwin-arm64" -O instgo

    Darwin(AMD64)

    地域

    公网地址

    VPC地址

    华东1(杭州)

    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

    华东2(上海)

    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

    华北1(青岛)

    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

    华北2(北京)

    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

    华北3(张家口)

    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

    华北5(呼和浩特)

    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

    华北6(乌兰察布)

    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

    华南1(深圳)

    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

    华南2(河源)

    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

    华南3(广州)

    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

    西南1(成都)

    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

    中国(香港)

    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

    新加坡

    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

    亚太东南2(悉尼)

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

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

    亚太东南3(吉隆坡)

    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

    亚太东南5(雅加达)

    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

    亚太东北1(东京)

    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

    欧洲中部1(法兰克福)

    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

    欧洲西部1(伦敦)

    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

    美国东部1(弗吉尼亚)

    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

    美国西部1(硅谷)

    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

    亚太南部1(孟买)

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

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

    华东1金融云

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

    华东2金融云

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

    华南1金融云

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

    政务云

    wget "http://arms-apm-cn-north-2-gov-1.oss-cn-north-2-gov-1.aliyuncs.com/instgo/instgo-darwin-amd64" -O instgo

    wget "http://arms-apm-cn-north-2-gov-1.oss-cn-north-2-gov-1-internal.aliyuncs.com/instgo/instgo-darwin-amd64" -O instgo

    Windows(AMD64)

    地域

    公网地址

    VPC地址

    华东1(杭州)

    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

    华东2(上海)

    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

    华北1(青岛)

    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

    华北2(北京)

    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

    华北3(张家口)

    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

    华北5(呼和浩特)

    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

    华北6(乌兰察布)

    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

    华南1(深圳)

    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

    华南2(河源)

    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

    华南3(广州)

    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

    西南1(成都)

    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

    中国(香港)

    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

    新加坡

    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

    亚太东南2(悉尼)

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

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

    亚太东南3(吉隆坡)

    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

    亚太东南5(雅加达)

    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

    亚太东北1(东京)

    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

    欧洲中部1(法兰克福)

    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

    欧洲西部1(伦敦)

    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

    美国东部1(弗吉尼亚)

    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

    美国西部1(硅谷)

    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

    亚太南部1(孟买)

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

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

    华东1金融云

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

    华东2金融云

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

    华南1金融云

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

    政务云

    wget "http://arms-apm-cn-north-2-gov-1.oss-cn-north-2-gov-1.aliyuncs.com/instgo/instgo-windows-amd64.exe" -O instgo.exe

    wget "http://arms-apm-cn-north-2-gov-1.oss-cn-north-2-gov-1-internal.aliyuncs.com/instgo/instgo-windows-amd64.exe" -O instgo.exe

  2. 为编译工具赋予可执行权限。

    Linux/Darwin

    # 赋予可执行权限
    chmod +x instgo

    Windows

    Windows中无需赋予可执行权限。

  3. 通过OpenAPI获取LicenseKey,具体方法,参见DescribeTraceLicenseKey - 列出LicenseKey

  4. 在项目main函数所在文件的目录下执行编译工具编译Go项目,请替换命令行中的{licenseKey}为上一步获取到的LicenseKey。

    如果您需要测试编译效果,或暂时无法获取到LicenseKey,可以添加--dev来开启Dev编译模式,此模式下不需要传入LicenseKey。

    重要

    Dev模式下编译结果部分功能有降级,请勿用于线上。

    Linux/Darwin

    ./instgo build --licenseKey="{licenseKey}"

    Windows

    .\instgo.exe build --licenseKey="{licenseKey}"

    如果您原本编译命令中含有后续的编译参数,请在所有选项添加完毕后,添加--分隔符,并将编译参数按照原有格式添加在后面,例如:

    Linux/Darwin

    ./instgo build --licenseKey="{licenseKey}" -- {arg1} {arg2} ...

    Windows

    .\instgo.exe build --licenseKey="{licenseKey}" -- {arg1} {arg2} ...

相关信息

  • Instgo常见命令与释义如下:

    命令

    flag

    接收参数类型

    含义

    是否必传

    build(编译)

    --licenseKey, -l

    string

    指定ARMS的LicenseKey。

    是(dev 模式下可不传)

    --dev

    -

    指定编译模式为开发模式,此模式下无需指定LicenseKey即可编译,用于测试基本可用性。

    重要

    部分功能有降级,请勿用于线上。

    --agentVersion

    string

    指定探针版本。

    --agentPath

    string

    指定本地探针路径。

    --cacheDir

    string

    指定探针缓存目录。

    --regionId, -r

    string

    指定拉取探针包依赖的OSS所在RegionId,默认为cn-hangzhou。

    --timeout, -t

    int

    指定拉取探针超时时间,默认为180秒。

    --verbose, -v

    -

    开启后,打出详细的编译日志。

    --vpc

    -

    开启后,默认走内网拉取探针包依赖。

    clean

    (清理产物)

    -

    -

    -

    -

    update(更新)

    --licenseKey, -l

    string

    指定ARMS的LicenseKey。

    --cacheDir

    string

    指定探针缓存目录。

    --regionId, -r

    string

    指定拉取探针包依赖的OSS所在RegionId,默认为cn-hangzhou。

    --timeout, -t

    int

    指定拉取探针超时时间,默认为180秒。

    --vpc

    开启后,默认走内网拉取探针包依赖。

    version

    (输出版本号)

    -

    -

    -

    -

  • 初次编译时,探针会默认被下载到/opt目录下(Windows为C:\ProgramData),如果该目录没有权限,可以使用--cacheDir flag指定缓存目录,或使用sudo -E命令执行编译(Windows请使用管理员权限执行编译命令)。

  • 编译过程中如果强制退出或出现异常退出,可能会存在编译残留。清理Golang探针编译残留的方法,请参见清理Golang探针编译残留

步骤二:配置环境变量

混合编译后,您需要手动为Go应用添加以下环境变量:

环境变量名

环境变量含义

示例值

是否必填

TYPE_IS_ARMS

ARMS总开关。

true

ARMS_APP_NAME

ARMS应用名。

mysql-server

否,如果已填写ARMS_APP_ID可不填此变量。

ARMS_REGION_ID

ARMS应用Region

cn-hangzhou

ARMS_LICENSE_KEY

ARMS应用LicenseKey。

可以通过DescribeTraceLicenseKey - 列出LicenseKey获取。

ARMS_APP_ID

ARMS应用ID。

-

否,如果已填写ARMS_APP_NAME可不填此变量。

ARMS_AGENT_ENV

应用所处的环境。

K8s/ECS

ARMS_CLUSTER_ID

应用所处的K8s集群ID。

-

ARMS_CLUSTER_NAME

应用所处K8s集群名称。

test-cluster

ARMS_NAMESPACE

应用所处K8s Namespace。

test-namespace

ARMS_WORKLOAD_NAME

应用的工作负载名称,如Deployment名称。

test-deploy

ARMS_WORKLOAD_KIND

应用的工作负载种类,如Deployment。

deployment

(可选)Dockers环境安装参考

对于Docker环境,可以参考以下Dockerfile示例修改您的Dockerfile文件。

### .....
ENV TYPE_IS_ARMS=true
ENV ARMS_APP_NAME={AppName}
ENV ARMS_REGION_ID={regionId}
ENV ARMS_LICENSE_KEY={licenseKey}

### 在下方添加自定义Dockerfile逻辑。
### ......

结果验证

约一分钟后,若Golang应用出现在ARMS控制台应用监控 > 应用列表页面中且有数据上报,则说明接入成功。

image