All Products
Search
Document Center

Application Real-Time Monitoring Service:Connect an SAE Go application to ARMS

Last Updated:Dec 03, 2025

You can monitor a Go application in Application Real-Time Monitoring Service (ARMS) after you manually install the ARMS agent and deploy the application to Serverless App Engine (SAE). ARMS lets you view various monitoring data, such as application topology, call trace analysis, and SQL performance analysis. This topic describes how to manually install the ARMS agent for an application and deploy it to SAE.

Prerequisites

Limitations

This feature is applicable only to Go applications that are deployed from images.

Procedure

  1. Prepare a project: This topic uses a demo project as an example.

  2. Build an image and push it to an ACR image repository: Build an image for the project and push it to an Alibaba Cloud Container Registry (ACR) repository. This makes the image available for creating a microservice application in SAE.

  3. Create an application: Deploy the image from the image repository to SAE and access the application.

  4. View application monitoring data: View the various monitoring data generated by the application.

Step 1: Prepare the project

Upload the Go project to your environment.

Step 2: Build an image and push it to an image repository

2.1. Build the image

This section provides only the commands to download the compilation tool and build the application.

  1. Download the compilation tool.

    # Download the wget command.
    RUN yum -y install wget
    
    # This topic uses the command to download the compile tool from an endpoint in the China (Hangzhou) region as an example.
    RUN wget "http://arms-apm-cn-hangzhou.oss-cn-hangzhou.aliyuncs.com/instgo/instgo-linux-amd64" -O instgo

    In a production environment, you must select the download endpoint based on the region of your build machine. For more information about the download endpoints, see Download commands for each region.

    Note

    The compilation tool is the same for all regions. If your environment can access OSS over the Internet, you can use the endpoint for the China (Hangzhou) region to obtain the compilation tool for your operating system and architecture.

  2. Add the execute permission to the binary file.

    RUN chmod +x instgo
  3. Use OpenAPI to obtain the license key. For more information, see DescribeTraceLicenseKey - Lists license keys.

  4. Replace the go build command with ./instgo build to build the application.

    # Replace {licenseKey} with the license key that you obtained in the previous step. Add instgo before go build.
    RUN ./instgo set --licenseKey="{licenseKey}" --cacheDir=./
    RUN ./instgo go build {args1} {args2}

    If you want to test the compilation or cannot obtain a license key, you can directly compile the application.

    RUN ./instgo go build {args1} {args2}

2.2. Push the image to the image repository

Push the Go image that you built to an Alibaba Cloud Container Registry (ACR) repository. For more information, see Push and pull images using an Enterprise instance or Push and pull an image.

Step 3: Create a Go application

This section describes only the key steps. For detailed instructions about how to create an application, see Deploy an application from an image.

3.1. Create the application

  1. On the Specify Image panel, set Technology Stack Programming Language to Go and select an image version.

    Zjyqn9Csms

  2. In the Application Monitoring section of the Advanced Settings page, turn on Application Monitoring.

    qVjKh7KK96

  3. Click Create Application.

3.2. Test access

  1. Add an Internet-facing endpoint for the application. For more information, see Attach a CLB instance to an application and generate an internet-facing or internal-facing IP address for the application.

    oG7Zx8icdv

  2. Copy the Internet-facing endpoint and paste it into your browser to test access.

Step 4: View application monitoring data

  • Log on to the ARMS console. In the navigation pane on the left, choose Application Monitoring > Application List. On the Applications page, click an application name to view its monitoring data.

  • Log on to the SAE console. In the navigation pane on the left, choose Applications > Applications. Click the name of your application to go to its Basic information page. In the navigation pane on the left, click Application Monitoring to view the monitoring data.

ZzhYn22HbM