All Products
Search
Document Center

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

Last Updated:Mar 11, 2026

When a Go application experiences high latency, excessive memory consumption, or unexpected CPU spikes in production, standard metrics and logs rarely pinpoint the exact method or line of code responsible. Continuous profiling in ARMS Application Monitoring captures CPU, memory, and I/O bottleneck data at the method name, class name, and line number level, enabling you to optimize programs, reduce latency, increase throughput, and save costs without reproducing issues locally.

Prerequisites

Before you begin, make sure that you have:

  • A Go application monitored by Application Monitoring

  • ARMS agent for Go 1.3.0 or later. To check the version, open the application details page and choose Configuration > Agent Management

Enable continuous profiling

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

  2. In the top navigation bar, select a region, then click the name of your application.

    Icons in the Language column indicate the application language:

    Java icon: Java

    Go icon: Go

    Python icon: Python

    Hyphen (-): application monitored in Managed Service for OpenTelemetry.

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

  4. In the Ongoing Profiling Settings section, turn on the Master switch and any additional profile-type switches as needed.

    Ongoing Profiling Settings

  5. Click Save. Changes take effect within 2 minutes.

View and analyze profiling data

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

  2. In the top navigation bar, select a region, then click the name of your application.

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

  4. In the instance list on the left, select a target instance. Then, on the right side of the page, set the time range for the data.

  5. On the Single View tab, query and analyze profiling data:

    Single View profiling interface

    1. Select a snapshot duration -- In the Time window size section (icon 1), choose a duration and drag on the line chart to select a time range.

    2. Select a profile type -- From the drop-down list (icon 2), select the data to view: CPU, Go heap, Goroutine, Mutex, and block.

    3. Analyze the results -- The selected time range (icon 3) populates the data panel. Click Aggregate analysis to open snapshot details.

    4. Performance analysis

      Read the profiling results table

      The profiling results table has two important columns:

      ColumnMeaningWhen to use
      SelfTime or resources a method consumes in its own code, excluding calls to child methods.Find methods that are individually expensive.
      TotalTime or resources a method consumes including all child method calls.Find the biggest overall contributors to resource usage.

      Locate bottlenecks with flame graphs: In the flame graph on the right, look for wide bars at the bottom. A wide bar means that method consumes a disproportionate share of resources -- this is typically where the bottleneck lies. The Self column in the table highlights the same hotspots.

      Profile types

      Each profile type captures a different dimension of your application's runtime behavior. Select the profile type that matches the performance issue you are investigating.

      CPU

      MetricWhat it measuresWhen to use
      CPU TimeNumber of CPU cores requested by each method.Identify compute-intensive code paths that drive high CPU utilization.

      CPU Time

      Memory (Go heap)

      MetricWhat it measuresWhen to use
      Allocated MemoryThe size of memory requested by each method.Find large or frequent allocations.
      AllocationsNumber of memory requests per method.Spot methods that request memory frequently, even if individual allocations are small.

      Allocated Memory

      Allocations

      Goroutine

      Goroutine

      Mutex

      MetricWhat it measures
      mutexContentionsMutex contention events.
      mutexDelayMutex delay time.

      mutexContentions

      mutexDelay

      Block

      MetricWhat it measures
      blockContentionsBlock contention events.
      blockDelayBlock delay time.

      blockContentions

      blockDelay

      Snapshot list

      The snapshot list shows all profiling snapshots captured during the selected time range. Click any snapshot to view its details.

      Snapshot list

See also