All Products
Search
Document Center

Application Real-Time Monitoring Service:Continuous profiling for Go applications

Last Updated:Sep 04, 2026

Continuous profiling helps you identify performance bottlenecks in your Go applications caused by CPU, memory, and I/O. It provides detailed statistics broken down by method name, class name, and line number, which helps you optimize code, reduce latency, increase throughput, and save costs. This topic describes how to enable the continuous profiling feature for Go applications in ARMS and view the profiling data.

Prerequisites

Ensure your application is connected to Application Monitoring and the Go agent is updated to version 1.3.0 or later. You can check the agent version on the Application Settings > Agent Management page.

Enable continuous profiling

  1. Log on to the ARMS console. In the left-side navigation pane, choose Application Monitoring > Application List.

  2. On the Application List page, select the region in the top navigation bar and then click the name of the application.

    Note

    Icons in the Language column have the following meanings:

    • Java icon: a Java application connected to Application Monitoring.

    • image: a Golang application connected to Application Monitoring.

    • image: a Python application connected to Application Monitoring.

    • -: an application connected to Managed Service for OpenTelemetry.

  3. In the top navigation bar, choose Application Configuration > Custom Configurations.

  4. In the Continuous Performance Profiling section, enable the master switch and other feature switches as needed.

    image

  5. Click Save. The settings take effect in about 2 minutes.

View profiling data

  1. Log on to the ARMS console. In the left-side navigation pane, choose Application Monitoring > Application List.

  2. On the Application List page, select the region in the top navigation bar and then click the name of the application.

    Note

    Icons in the Language column have the following meanings:

    • Java icon: a Java application connected to Application Monitoring.

    • image: a Golang application connected to Application Monitoring.

    • image: a Python application connected to Application Monitoring.

    • -: an application connected to Managed Service for OpenTelemetry.

  3. In the top navigation bar, choose Application Diagnostics > Continuous Performance Profiling.

  4. From the instance list on the left, select a target instance. Then, set the time range for the data on the right.

  5. On the Search tab, you can filter data and view the aggregate analysis.

    2025-04-23_13-43-58

    1. In the Time window size section (labeled ①), select a snapshot duration, and then drag your pointer on the chart to select a snapshot time range.

    2. From the drop-down list (labeled ②), select a data type: cpu, go heap, goroutine, mutex, or block.

    3. The data list for the selected time range is displayed in the area labeled ③. Click Aggregation & Analysis in the upper-right corner to view snapshot details.

      Performance analysis

      • CPU Time: Profiling data for cpu hotspots.

        image

      • Allocated Memory: Profiling data for memory hotspots.

        image

      • Allocations: Profiling data for memory allocation frequency hotspots. This data identifies which methods allocate memory frequently.

        image

      • goroutine:

        image

      • mutex analysis

        mutexContentions:

        image

        mutexDelay:

        image

      • block analysis

        blockContentions:

        image

        blockDelay:

        image

      Note
      • The Self column shows the resources consumed by the method itself, excluding resources consumed by any methods it calls (its children). This helps identify methods that are inherently expensive.

      • The Total column shows the resources consumed by the method and all methods it calls. This helps identify the overall impact of a method on resource consumption across the entire call stack.

      To investigate specific hotspot code, focus on the Self column or look for wide bars at the bottom of the flame graph. These wide bars represent the root cause of high consumption in the upper layers of the call stack and typically indicate the primary performance bottlenecks. You should focus your optimization efforts on these methods.

      Snapshot list

      image

Related documents

You can use continuous profiling to troubleshoot issues such as high CPU and memory usage. For more information, see the following topics: