Abstract: Support for monitoring slow HTTP requests, and fix the BUG that recorded HTTP response time is too small.
Fundebug is a professional micro game BUG monitoring service on wechat. It can catch the anomalies, errors or bugs of small games in the online environment in the first time, and timely push alarms to developers to help you quickly fix bugs.
The Fundebug micro game BUG monitor plugin is updated to 0.5.0, adding the httpTimeout configuration option, supporting the monitoring of slow HTTP requests, and also fixed the record of the HTTP response time is too small BUG, please update timely!
Monitor SLOW HTTP requests
Fundebug is focused on BUG monitoring and is not intended to provide a comprehensive performance monitoring service for the time being. However, when HTTP requests are slow and the user experience is poor, it can also be understood as a BUG in the broad sense. HTTP request performance problems, may be the code algorithm is not good enough, may be the database index is not reasonable, and may be other reasons, these are technical level “BUG”, developers need to deal with in time.
Of course, monitoring the response time of all HTTP requests is not something we need to do at Fundebug, so we only support monitoring slow requests. You only need to configure a threshold httpTimeout. All HTTP requests whose response time exceeds the threshold will be reported to Fundebug. This helps developers detect slow requests and optimize performance in time.
Wechat mini game configuration option NetworkTimeout
According to the development document of wechat mini-games, the default timeout time of network requests is 60s. Users can customize it by configuring NetworkTimeout. If the response time of an HTTP request exceeds this threshold, the request will fail and Fundebug will report this timeout error. However, networkTimeout cannot be set too low, otherwise timeout requests will fail, which is not reasonable. Therefore, configuring NetworkTimeout cannot monitor slow HTTP requests.
httpTimeout
The proper way to monitor slow HTTP requests is through the Fundebug configuration option httpTimeout.
The httpTimeout type is Number, in milliseconds (ms).
If you want to monitor slow HTTP requests, you can configure a threshold with httpTimeout, such as 1000:
fundebug.init({
httpTimeout: 1000
});
Copy the code
Fundebug is reported for all HTTP requests whose response time exceeds 1000ms.
reference
- Fundebug document – httpTimeout
About Fundebug
Fundebug focuses on real-time BUG monitoring for JavaScript, wechat applets, wechat games, Alipay applets, React Native, Node.js and Java online applications. Since its official launch on November 11, 2016, Fundebug has handled over 1 billion error events in total, and paid customers include Sunshine Insurance, Walnut Programming, Lychee FM, Zhangmen 1-on-1, Weimai, Qingtuanshe and many other well-known enterprises. Welcome to try it for free!
Copyright statement
Reprint please indicate the author Fundebug and this article addresses: blog.fundebug.com/2019/08/05/…