WeChat interface analysis
By default, the probe monitors the number of calls, successes and failures of the three WeChat interfaces requestPayment
, scanCode
, and previewImage
. For the payment interface, it also monitors the cancellation situation. You can specify the interface name you want to monitor through hookApis
in the probe initialization configuration (no need to write the wx. prefix).
NOTE:
- For the
request
interface, monitored by a separate request module, configuration here will be ignored.- The number of successes and failures can only be monitored if the custom monitoring interface provides success and fail callbacks. Otherwise, only the number of calls can be monitored.
Example (only monitor the requestPayment interface):
const monitor = require('./agent/tingyun-mp-agent.js');
monitor.config({
...,
hookApis: ['requestPayment']
})