Front-end error monitoring

do you do error monitoring at the front end?
js reports errors,
interfaces report errors,
resources report errors

what open source libraries are recommended?

For those who charge for fundebug, there is no need to introduce them.

or you can introduce some tool libraries and want to build one yourself, and then you can define various notification methods.

May.09,2021

  1. misclassification
  • timely run error: code error
    try.catch window.onerror
  • Resource loading error (not bubbling)
    object.onerror

performance.getEntries () (get all the loaded resources on the page, and indirectly judge the resources that failed to load based on the resources already loaded.
Error event capture

  1. report error
  • report using ajax communication
  • use image object to report (most of them use this, simple, without other libraries, one line of code to solve all)

eg: (new Image ()). Src = 'http://baidu.com/tesjk?r=tksjk';

There are several error types in
  1. js: 6 types:

SyntaxError syntax error ReferenceError reference error TypeError type error RangeError range error parameter out of range

pick up my personal blog http://www.liuweibo.cn/p/86


is currently using https://sentry.io/, but this is also a charge, but there is a free limit available.
for small and medium-sized projects, it is not recommended to build a self-built error collection service, because it takes effort to maintain the entire service, so it is better to use an existing service directly, which is much cheaper than raising a programmer.


the free quota of raven, is actually enough for small projects. In fact, the overall feeling is that small projects really do not need any error monitoring, and the income is too low, time-consuming and laborious, so it is better to put more effort into improving the quality of the code.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e54924-4d65c.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e54924-4d65c.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?