TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

A Better Way to Track JavaScript Errors

196 pointsby toddgardnerabout 11 years ago

33 comments

daigoba66about 11 years ago
While I appreciate a need for "Error Logging as a Service", I really wish all of these kind of tools were open and could configured for logging back to our own servers without needing to access anything else in the "cloud". Building LoB web apps that are often accessed from heavily firewalled networks makes these tools, unfortunately, useless.
评论 #7527682 未加载
评论 #7525055 未加载
评论 #7525015 未加载
评论 #7530868 未加载
评论 #7524834 未加载
josephwegnerabout 11 years ago
This is aweesome! I&#x27;ve played around with the idea of building something like this in the past, and have always shied away because of the complexity. Well done - it looks super useful.<p>One minor critique: Can you refer to yourself as &quot;track.js&quot; or &quot;TrackJS&quot; instead of {Track.js}? You&#x27;re going to drive me nuts if I have to type curly braces every time I mention you somewhere.
yeldarbabout 11 years ago
Saw their presentation at Iowa Code Camp last year and I was really impressed.<p>Unfortunately, at the time, they had no plans to support source maps. We exclusively use minified JavaScript in production. Seems like not getting a proper line number or filename in a stack trace would be a huge hindrance to debugging.
jallmannabout 11 years ago
Hopefully there&#x27;s also a good way to track backend errors, because I&#x27;m getting this:<p><pre><code> Error establishing a database connection</code></pre>
评论 #7524011 未加载
评论 #7524008 未加载
评论 #7523993 未加载
hcarvalhoalvesabout 11 years ago
As an alternative, Sentry also has a JS client [1], but is not limited to it, so you can centralize all error reporting in one tool.<p><a href="https://www.getsentry.com/for/javascript/" rel="nofollow">https:&#x2F;&#x2F;www.getsentry.com&#x2F;for&#x2F;javascript&#x2F;</a>
评论 #7524086 未加载
评论 #7523910 未加载
jhuckesteinabout 11 years ago
I like this approach a lot. If this works in IE, I&#x27;m basically sold.<p>I do have a few questions that went unanswered, though:<p>- What&#x27;s the performance impact, both in terms of initial page load and in terms of tracking stuff.<p>- How big is the buffer of &quot;events&quot; in the timeline?<p>- You charge per hit. Is there a way I can load the javascript from my own CDN? Does it ping your server upon load?<p>- What prevents somebody from going to my website and triggering a large number of &quot;hits&quot;?
评论 #7523997 未加载
评论 #7524062 未加载
评论 #7524071 未加载
评论 #7524027 未加载
necroabout 11 years ago
Your script name is tracker.js which is not the best name as adblockers&#x2F;privacy blockers simply block any names with the word track and many other similar names. If you name your script something else that is not blocked it would enable it to run, and be valuable to see the errors that users get when they block other js on a page.
评论 #7532191 未加载
manishsharanabout 11 years ago
I searched trackjs.com for minify or minified or &quot;source map&quot; and nothing comes up.<p>So my question will Trackjs work with Javascript code output by Google&#x27;s Closure Compiler? I have tried Tracekit in the past and other similar Saas services for client javascript error logging and nothing seems to work with minified source produced by Closure compiler. Unfortunately, I can&#x27;t do without Closure compiler and minification.<p>edit : typo
评论 #7529205 未加载
评论 #7525375 未加载
ecarothabout 11 years ago
We have used Track.js for many months to track JS errors in our production application and it is truly key to helping me and our CTO be aware of any client-facing issues that exist, recreate&#x2F;fix those issues, and sleep well at night. I also know the founders personally and they are extremely skilled developers with deep expertise in Javascript and the DOM and I have no doubt they will continue to innovate and give us even more bang for our already well-worth-it buck
benarentabout 11 years ago
Full disclosure, I run product at <a href="http://airbrake.io" rel="nofollow">http:&#x2F;&#x2F;airbrake.io</a>.<p>We&#x27;ve always had high demand for Javascript error reporting. We&#x27;ve been slowly building out a new notifier which address the importance of page load and capturing errors without blocking the page load. <a href="https://github.com/airbrake/airbrake-js" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;airbrake&#x2F;airbrake-js</a><p>One of the main problems is clients &#x2F; IE, not only on how they throw errors but also standards of source-map support and standardisation of how errors should be handled.<p>I welcome trackjs and all over javascript errors to come together to help make it better for all developers. I&#x27;m not sure on actions yet but NewRelic has started to do great work in the Node space already.<p>@ToddGardner! We wish you the best of luck, the app looks great.
评论 #7526469 未加载
thatthatisabout 11 years ago
I applaud this effort and it is a step in the right direction for JS app error tracking, but it is a half-measure: we need to get to the point where frontend frameworks track this by default, post back to a common server endpoint, and then that error report is emailed to the dev&#x2F;admin list
评论 #7524022 未加载
gooabout 11 years ago
I&#x27;ve been waiting for the kick in the pants to finally add js error tracking.<p>This looks great. At my previous company, I set up Errorception (<a href="https://errorception.com/" rel="nofollow">https:&#x2F;&#x2F;errorception.com&#x2F;</a>) and it was a good step, but I&#x27;m excited by the production-side logging possibilities that track js offers, and the timeline feature.<p>I&#x27;ve just now added it to my current company (<a href="https://zoomforth.com" rel="nofollow">https:&#x2F;&#x2F;zoomforth.com</a>), and would be happy to report later on how it works out!
toddgardnerabout 11 years ago
Wow everyone, thank you so much for your support! Your comments and ideas have been amazing and positive. We&#x27;re thrilled to be making an impact and to help make the web better.<p>Thanks HN, you&#x27;re awesome.
danbrucabout 11 years ago
On the one hand this looks nice, on the other hand it is a shame that something like this is needed at all. Most of the errors I see in the wild are type errors and the industry has just failed to offer a good solution when JavaScript took off. I really hope there will be a lot more adoption of technologies that solve the problem instead of treading the symptoms in the future, for example new ES6+ features, JavaScript supersets like TypeScript or trans-compilation like GWT.
ing33kabout 11 years ago
will check after some time ( when db error is fixed ) , looks interesting from the home page..<p>side note: before posting on HN, its a good practice to see how much load the site can handle .<p>some easy to use tools : - <a href="https://loader.io/" rel="nofollow">https:&#x2F;&#x2F;loader.io&#x2F;</a> ( ref link : <a href="https://loader.io/s/kXCLA" rel="nofollow">https:&#x2F;&#x2F;loader.io&#x2F;s&#x2F;kXCLA</a> )<p>- <a href="https://www.blitz.io/" rel="nofollow">https:&#x2F;&#x2F;www.blitz.io&#x2F;</a>
iLochabout 11 years ago
I really like the idea of a telemetry timeline to show exactly what was going on when the error happened - like a well informed stack trace.
评论 #7524089 未加载
mattmanserabout 11 years ago
I just noticed this is the script link:<p><pre><code> &#x2F;releases&#x2F;1.2.2&#x2F;tracker.js </code></pre> Is it a good idea to have the version number in there?<p>As won&#x27;t that mean you&#x27;ll never be able to update your customers with new versions of the script?<p>Nice product though, looks great, easy to use.<p>EDIT: Seriously, this product is awesome, amazing UI, easy to use. Try it out.
评论 #7524054 未加载
评论 #7524200 未加载
评论 #7524083 未加载
评论 #7524076 未加载
dalelottsabout 11 years ago
I&#x27;ve been using TrackJS for several months (Oct of last year I think) on personal project and I also introduced it into the products that I develop at Pearson VUE. It has been rock solid and extremely helpful. We attempted a home grown version before switching to TrackJS and we are much happier now.
BinaryIdiotabout 11 years ago
Hmm I&#x27;m skeptical about the reliability of this especially on older browers.<p>Does it track these events basically in an order? JavaScript is single threaded in the browser so multiple reschedulings could easily hit different objects and events unrelated to each other.<p>Looks interesting nonetheless.
impostervtabout 11 years ago
Very cool. Can you pass arbitrary parameters to the tracker? For instance, could I somehow pass in the user&#x27;s id, and have that show up on the page? That way if he&#x2F;she gave me a call and said something went wrong, it&#x27;d be easier to pin down.
评论 #7524248 未加载
Sarkieabout 11 years ago
Need to look into this more, I did something like this in the past with window.onerror which then set the error to our site so we could monitor javascript errors on client machines. Worked well enough, but yours looks a tad more polished than my attempt!<p>Good work!
bckmnabout 11 years ago
Seems like a souped-up version of [ErrorBoard](<a href="https://github.com/Lapple/ErrorBoard" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;Lapple&#x2F;ErrorBoard</a>), which is cool, but also means I can roll my own. Nice work.
robgeringabout 11 years ago
This is super cool. Tools that capture errors on the user&#x27;s end are invaluable. In an ideal world, the user would never experience errors, but I haven&#x27;t lived in that world yet. Can&#x27;t wait to see how this evolves.
tieTYTabout 11 years ago
I wish your blog post picture showed us the stack trace tab. With the screenshot you used, I don&#x27;t see how that could help me debug my typical client-side error. What I usually need is a stack trace.
LazerBearabout 11 years ago
This seems promising, however you might want to provide some interactive demo if you want more signups. And make it clearer that there&#x27;s a free trial. But again, looks very good and I might use it.
alecsmart1about 11 years ago
It says it&#x27;s a 30 day trial. I looked but couldn&#x27;t find any pricing on the page. Can you please let me know your pricing?
评论 #7524752 未加载
评论 #7530020 未加载
couradicalabout 11 years ago
How does this work for internal applications?<p>I looked through your site, and couldn&#x27;t find any documentation without creating an account.
roschdalabout 11 years ago
I love this! Added it to use on <a href="http://play.freeciv.org" rel="nofollow">http:&#x2F;&#x2F;play.freeciv.org</a> now.
tlrobinsonabout 11 years ago
There&#x27;s also rollbar.com but I like how this tracks user events to give errors more context.
lnanek2about 11 years ago
Wow, I&#x27;m impressed with the detailed events tracked before the error.
radagaisusabout 11 years ago
How does this work for 3rd-party scripts?
resuabout 11 years ago
Looks very promising, I&#x27;ll give it a try!
评论 #7524142 未加载
syntheticlifeabout 11 years ago
Username, password and email to sign up for an account for a service that doesn&#x27;t need any.. No thanks.
评论 #7524636 未加载