Application Performance Management (APM) provides trace sampling capabilities, which are implemented through the tail-based sampling technology. Reasonable sampling configuration can reduce the storage volume of trace data. For more information on sampling configuration, please refer to Reducing APM Usage Costs Through Sampling Policies. Directions
Note:
Currently, sampling policies are made available through an allowlist. Please submit a ticket to apply. 2. In the left sidebar, select Application Performance Management > System Configuration to enter the Sampling configuration page.
Configuring the Global Sampling Ratio
1. In the Global sampling configuration module, click Edit.
2. Fill in the sampling percentage. The valid sampling percentage is between 10% and 100%.
Note:
Configure the threshold for saving slow calls and whether to save error traces according to actual needs. If there are error calls or slow calls in a trace, the entire trace will be completely saved. It is recommended to enable error trace saving and set the threshold for saving slow calls between 500ms - 2000ms.
Configuring Full Sampling APIs
When the global sampling ratio is less than 100%, you can customize the APIs that need full sampling. If the trace passes through the APIs that need full sampling, the entire trace will be completely saved.
1. Click Add interface for full sampling.
2. In the dialog box, enter the policy name in the dialog box and specify the APIs that needs full sampling.
If a specific application is specified in the policy, you can leave the API matching rule empty. This means that all traces passing through this application will be completely saved. You can specify APIs using exact matching, prefix matching, or suffix matching. In actual usage scenarios, you can define important APIs with high attention as full sampling APIs to ensure that no calls to important APIs are missed.
Note:
Updates to the global sampling ratio and full sampling APIs can take effect immediately.