Ignoring Monitored Pages
When you do not want to monitor certain pages, you can set the ignoredPages property in the probe startup configuration to specify the specific pages.
Example:
const monitor = require('./agent/tingyun-mp-agent.js');
monitor.config({
...,
ignoredPages: ['pages/index/index', 'pages/login/login'],
...
})
The initial probe configuration properties are as follows:
| Name | Type | Description | Required | Default Value |
|---|---|---|---|---|
| beacon | String | Probe upload server address | Yes | None |
| key | String | Mini Program application key | Yes | None |
| id | String | Mini Program account key | Yes | None |
| sampleRate | Number | Initial sampling rate, usually set between 0 and 1. If value >= 1, full collection; if value < 0, no collection | No | 1 |
| custom | Function | Upload custom status code and other custom information | No | null |
| plugin | Boolean | Whether to enable plugin support mode, default true | No | true |
| hookApis | Array<String> | List of APIs to monitor | No | ['requestPayment','scanCode','previewImage'] |
| eventTimeout | Number | Operation timeout, in milliseconds | No | 60000 |
| ignoredPages | Array<String> | List of pages to exclude from monitoring | No | [] |
| disableFetchQuery | Boolean | Whether not to upload App startup parameters | No | false |