All Products
Search
Document Center

Application Real-Time Monitoring Service:Select a trace sampling mode for the ARMS agent earlier than V3.2.8

Last Updated:Mar 11, 2026

Distributed systems generate large volumes of duplicate or low-value traces. Trace sampling reduces storage and compute costs by retaining only the traces you are most likely to investigate, such as errors, slow requests, and critical paths.

ARMS supports four sampling modes. Each mode targets different traffic patterns and cost goals.

Sampling modeHow it worksBest for
Fixed-rate samplingRetains a set percentage of all tracesPredictable traffic with stable volume
Adaptive samplingDynamically adjusts sampling across interfaces using multiple strategiesHeavy or highly variable traffic (recommended)
Basic Edition samplingFree tier plus custom policies by interfaceBasic Edition users managing costs
Sampling for failed or slow requestsCaptures error and latency outlier spansCatching issues without full-rate sampling

Fixed-rate sampling

Fixed-rate sampling retains a set percentage of traces based on TraceId. At a 10% rate, one out of every 10 traces is recorded. Each trace is either fully retained or fully discarded -- partial traces do not occur.

image

Configure fixed-rate sampling

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

  2. Select a region in the top navigation bar and click the application.

    Note

    Icons in the Language column indicate the programming language:

    • Java icon: Java

    • Go icon: Go

    • Python icon: Python

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

  3. In the left-side navigation pane, click Application Settings. On the page that appears, click the Custom Configuration tab.

  4. In the Sampling rate setting section, set Sample rate model to Fixed sampling rate. In the Sampling Rate Settings field, enter a percentage value. For example, enter 10 for a 10% sampling rate.

    Note

    Changes take effect immediately without an application restart. The default value is 10. A higher sampling rate consumes more system resources. Keep the default unless your workload requires a higher rate.

Adaptive sampling

Adaptive sampling dynamically decides whether to sample each trace by combining three strategies. This mode balances low costs with comprehensive monitoring. Use it when traffic is heavy or fluctuates significantly.

StrategyDescriptionConfigurable
Full sampling for specific interfacesSpecify interface names, prefixes, or suffixes to retain 100% of their traces. Enable this only for critical interfaces, because it increases the volume of collected data.Yes
Sampling for top N requestsUses the Least Frequently Used (LFU) algorithm to sample a subset of entries per interface. Prevents data volume from growing linearly with traffic.No
Minimum sampling for all interfacesSamples at least one trace per interface within each time window. Preserves visibility for low-traffic interfaces.No
image

Configure adaptive sampling

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

  2. Select a region in the top navigation bar and click the application.

    Note

    Icons in the Language column indicate the programming language:

    • Java icon: Java

    • Go icon: Go

    • Python icon: Python

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

  3. In the left-side navigation pane, click Application Settings. On the page that appears, click the Custom Configuration tab.

  4. In the Sampling rate setting section, set Sample rate model to Adaptive sampling. Specify the interface names, prefixes, or suffixes for full sampling.

    Note

    Changes take effect immediately without an application restart. Adaptive sampling requires ARMS agent V2.8.3 or later.

Basic Edition sampling

Basic Edition sampling is available only to Application Monitoring Basic Edition users. It provides a free sampling policy and supports custom sampling policies.

Policy typeDescription
Free sampling policyCollects one trace per minute for each agent across all interfaces in your account, at no cost.
Custom sampling policySamples traces based on a fixed proportion or a fixed traffic limit. Each policy can target all interfaces or a specific interface.

Add a custom sampling policy

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

  2. Select a region in the top navigation bar and click the application.

    Note

    Icons in the Language column indicate the programming language:

    • Java icon: Java

    • Go icon: Go

    • Python icon: Python

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

  3. In the left-side navigation pane, click Application Settings. On the page that appears, click the Custom Configuration tab.

  4. In the Sampling rate setting section, click Add Client Sampling Policy. Configure the following parameters and click OK.

    ParameterDescription
    Sampling Policy NameA name for the sampling policy.
    Sampling type and Sampling valueFixed proportion sampling: Samples traces at a specified ratio. Enter a percentage in Sampling value, such as 10%. Flow limit: Collects a specified number of traces per agent within a time interval. For example, 5 traces per agent every 1 second.
    Applicable interfaceThe scope of the policy. Select Each interface to apply to all interfaces, or Specify Interface to target a single interface by name. To target multiple interfaces, create a separate policy for each one.

Sampling for failed or slow requests

This mode captures spans when a request meets any of the following conditions:

ConditionDescription
Error responsesThe HTTP interface returns a status code other than 2xx or 3xx, or a service exception is thrown to the framework and caught by LocalRootSpan.
Latency outliersThe request duration exceeds the 99th percentile (p99) of historical durations for the same interface. The p99 threshold may have deviations due to bucket aggregations.
Method exceptionsAn exception is thrown by a method within the request. Supported only by ARMS agent V4.1.x.
Important

This mode does not guarantee complete trace integrity. When sampling is triggered, only spans within the current application are saved. Spans from upstream or downstream services in the same trace may not be captured.

Throttling

The ARMS agent limits trace collection to 100 traces per second by default to prevent monitoring from affecting application performance under heavy traffic. This limit applies to both fixed-rate sampling and adaptive sampling.

To adjust this limit, modify the Throttling Threshold parameter on the Custom Configuration tab.

Note

A higher throttling threshold consumes more system resources. Keep the default unless your monitoring setup requires more traces per second.

What's next

After traces are sampled, use filter conditions and aggregation dimensions to analyze trace data in real time with the trace explorer.