javascript错误_JavaScript错误监控

£神魔★判官ぃ 2023-02-22 03:35 122阅读 0赞

javascript错误

One of the reasons I love front-end development is the reason many server-side developers hate it: the difference in browser implementations, the different implementation dates, and the ability to hang yourself with bad JavaScript. I enjoy the hell out of this battle despite having no control over the browser environment but I’m not crazy — I always have a safety net to detect errors quickly. That safety net? TrackJS. TrackJS allows me to detect JavaScript errors in real time, telling me what browser the user is navigating with, which pages the error occurs, and much more.

我喜欢前端开发的原因之一是许多服务器端开发人员讨厌它的原因:浏览器实现的差异,实现日期的不同以及使用不良JavaScript的能力。 尽管无法控制浏览器环境,但我还是在这场战斗中度过了艰难的时光,但我并不疯狂-我始终有一个安全网来快速检测错误。 那个安全网? TrackJS 。 TrackJS允许我实时检测JavaScript错误,告诉我用户正在使用哪种浏览器浏览,发生错误的页面以及其他更多信息。

TrackJS is a sponsor of this blog and I’m proud to represent! Before using TrackJS I was trying to do error tracking via Google Analytics but that wasn’t going well — I wasn’t getting the detail I wanted which isn’t surprising considering GA is a generic analytics tool not fine tuned for error reporting. TrackJS, on the other hand, built for tracking JavaScript errors and it does the task quite well. I’ve used their service for over a year now and owe them many thanks for saving my behind!

TrackJS是此博客的赞助商,我很荣幸代表您! 在使用TrackJS之前,我试图通过Google Analytics(分析)进行错误跟踪,但是效果并不理想-我没有得到我想要的细节,考虑到GA是一种不适合错误报告的通用分析工具,这不足为奇。 另一方面,TrackJS是为跟踪JavaScript错误而构建的,它可以很好地完成任务。 我已经使用了他们一年多的服务,并感谢他们,感谢他们为我提供的帮助!

谢谢TrackJS (Thank You TrackJS)

TrackJS has alerted me to many issues over the past few years, including:

在过去的几年中,TrackJS提醒我注意许多问题,包括:

  • Piloting multiple Service Worker related WordPress plugins created by Mozilla

    试验由Mozilla创建的多个与Service Worker相关的WordPress插件

    • Watch out for Safari’s lack of native Promise and arrow function support!

      当心Safari缺少本机Promise和箭头功能支持!

    . @trackjs alerted me to said errors and I was able to make fixes. DECENT! pic.twitter.com/w2hzTn5nxB

    — David Walsh (@davidwalshblog)

    。 @trackjs提醒我说错误,并且我能够进行修复。 不错! pic.twitter.com/w2hzTn5nxB

    — David Walsh(@davidwalshblog) April 4, 2016 2016年4月4日

  • JavaScript API updates (…or lack of) by browsers

    浏览器JavaScript API更新(…或缺少)

    • Safari is the new Internet Explorer 6…

      Safari是新的Internet Explorer 6。

  • Error detection for advertisement blocking

    错误检测以阻止广告

    • Messages
  • JavaScript library errors

    JavaScript库错误

    • Maybe my build system shouldn’t be pulling the latest version without me testing first….

      也许在没有我先测试的情况下,我的构建系统不应获取最新版本。

What’s awesome is that I got alerted to these issues via my nightly TrackJS email so I could get to them within hours of a push. I can configure my TrackJS panel to notify me off issues earlier but for this blog I’m happy with the nightly ping.

很棒的是,我通过每晚的TrackJS电子邮件收到有关这些问题的警报,因此我可以在推送后的几个小时内找到它们。 我可以配置TrackJS面板以更早地通知我有关问题的信息,但是对于此博客,我对每晚的ping操作感到满意。

新功能 (New Features)

TrackJS has recently implemented some solid new features that make collaborating and data management easier:

TrackJS最近实现了一些可靠的新功能,这些功能使协作和数据管理更加容易:

  • Sharing: From any error, you can now generate a shareable link. You can use this link to share error details with colleagues, or post them publicly and ask questions online.

    共享 :出现任何错误,您现在都可以生成一个可共享的链接。 您可以使用此链接与同事共享错误详细信息,或将其公开发布并在线提出问题。

  • Metadata API: Allows you to add any arbitrary key-value about the current environment. For example, the user’s permission level or the current server. Once this information is provided, you can slice and dice your errors by nearly any way you can conceive.

    Metadata API :允许您添加有关当前环境的任何任意键值。 例如,用户的权限级别或当前服务器。 一旦提供了这些信息,您就可以通过几乎任何可以构想的方式对错误进行切片和切块。

  • Global Filter: Across the UI, an “Add to Filter” button has been added. You can see this in messages, users, browsers, or metadata. You can choose any single item from these and filter the rest of the UI by this property. For example, add Safari to your filter, and then see all the messages that have impacted Safari.

    全局过滤器 :在整个UI上,已添加了“添加到过滤器”按钮。 您可以在消息,用户,浏览器或元数据中看到它。 您可以从中选择任何一项,然后通过此属性过滤UI的其余部分。 例如,将Safari添加到过滤器中,然后查看所有影响Safari的消息。

乍看上去 (At a Glance)

A few look-ins at my TrackJS panel:

在TrackJS面板上进行了一些查找:

错误详情 (Error Detail)

Error Detail

留言内容 (Messages)

Messages

乌尔斯 (Urls)

Urls

浏览器 (Browsers)

Browsers

分享 (Share)

Share

每晚电子邮件 (Nightly Email)

Email

试试TrackJS! (Try TrackJS!)

TrackJS is a sponsor but more so a service I’ve trusted to keep me in the loop about my site’s JavaScript stability and performance. Browser change, implementations change, user actions change; it’s good to know I can see where the errors are happening so I can fix my busted code!

TrackJS是赞助商,但更重要的是,我信任该服务,可以让我随时了解网站JavaScript稳定性和性能。 浏览器更改,实现更改,用户操作更改; 很高兴知道我可以看到错误发生在哪里,因此我可以修复我的无效代码!

翻译自: https://davidwalsh.name/trackjs

javascript错误

发表评论

表情:
评论列表 (有 0 条评论,122人围观)

还没有评论,来说两句吧...

相关阅读

    相关 JavaScript -- 前端错误监控

    错误分类 1:运行错误(代码错误) 2:资源加载错误 对应上面的俩种错误类型,分别有几种错误捕获方式。 运行错误捕获方式 1:try...catch 组合  2:wi

    相关 JavaScript 常见错误

    接触JavaScript两年多遇到过各种错误,其中有一些让人防不胜防,原来对JavaScript的误会如此之深,仅以此文总结一下常见的各种想当然的误区 String rep