Skip to content

JavaScript Error Logging in Minutes

nikgraf.com
30 pointsnik-graf12 comments
On HN

Comments

For anyone who plans to set this up on a site that gets moderate traffic, here's an example Raven config that helps weed out exceptions caused by 3rd party scripts and browser extensions:

https://gist.github.com/impressiver/5092952

I initially set up Raven without this ignore list, and we drowned in exceptions caused by shoddy browser plugins and userscripts. On the flipside, sifting through those logs did help to explain a few unreproducible support tickets.

Hope someone finds this of use!

Thanks a lot for sharing :)

Does anyone happen to know if there is an open-source equivalent to this type of service? Obviously, saving the errors isn't that difficult, but reporting it back in a decently browseable interface requires a bit more effort. :-)

If nobody knows of anything, I might try building my own.

Here you can find the open sourced JavaScript lib https://github.com/getsentry/raven-js

That is very helpful. Thanks!

Thanks for pointing this out. I missed that item on the home page. :-)

Anyone knows whether the error handling API already is consistent between browsers?

I believe Sentry's JS error reporting uses TraceKit: https://github.com/occ/TraceKit

TraceKit is pretty great, we're using it in a client project. Though it did not work in the Android WebView for me.

Thanks for the pointer, last time I looked it was still a pain to normalize across different browsers :)

Yes it does as far as I know. Really an awesome lib.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.