SDK reporting configuration

更新时间:
复制 MD 格式

This topic describes how to control the data volume reported by the SDK.

Both SDK configuration and sample rate settings control data collection and reporting. You must configure the SDK and the sample rate to ensure that data is collected and reported correctly.

SDK configuration

Some plugins provide configuration options to filter data for collection and reporting. Data that matches specific filter conditions is not reported. For more information about the configuration items, see SDK API.

Example
// SDK initialization....

// Use the SDK configuration to filter data from collection and reporting.
// The request plugin filters XHR requests.
// The resource plugin filters the 'https://www.aliyun.com/index.js' resource.
apm.start({
  request: {
    disableXHR: true,
  },
  resource: {
    ignoreList: ['https://www.aliyun.com/index.js']
  }
});

Sample rate configuration

To implement more granular field filtering or to report data proportionally, you can configure the sample rate for specific modules in the console. See Reporting configuration for the specific configuration steps.