Ignore monitoring page
When you do not want to monitor certain pages, you can set the attribute ignoredPages
in the probe startup configuration to specify specific pages.
Example:
const monitor = require('./agent/tingyun-mp-agent.js');
monitor.config({
...,
ignoredPages: ['pages/index/index', 'pages/login/login'],
...
})
The initialization probe configuration properties are as shown in the following table:
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 | Initialization sampling rate, generally set a value between 0 and 1. If the value is greater than or equal to 1, all samples will be collected, if the value is less than 0, no collection will be performed | No | 1 |
custom | Function | Upload custom status code and custom status and other information | No | null |
plugin | Boolean | Whether to enable plug-in support mode, default true | No | true |
hookApis | Array | List of interfaces to be monitored | No | ['requestPayment','scanCode','previewImage'] |
eventTimeout | Number | Operation timeout, milliseconds | No | 60000 |
ignoredPages | Array<String> | List of pages excluded from monitoring | No | [] |
disableFetchQuery | Boolean | Whether not to upload App startup parameters | No | false |