Skip to main content

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:

NameTypeDescriptionRequiredDefault value
beaconStringProbe upload server addressYesNone
keyStringMini program application keyYesNone
idStringMini program account keyYesNone
sampleRateNumberInitialization 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 performedNo1
customFunctionUpload custom status code and custom status and other informationNonull
pluginBooleanWhether to enable plug-in support mode, default trueNotrue
hookApisArrayList of interfaces to be monitoredNo['requestPayment','scanCode','previewImage']
eventTimeoutNumberOperation timeout, millisecondsNo60000
ignoredPagesArray<String>List of pages excluded from monitoringNo[]
disableFetchQueryBooleanWhether not to upload App startup parametersNofalse