New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use zone.js to instrument browser interaction points #82

Closed
duncanbeevers opened this Issue Apr 24, 2014 · 6 comments

Comments

Projects
None yet
5 participants
@duncanbeevers
Contributor

duncanbeevers commented Apr 24, 2014

@vmihailenco @dvdplm @benarent
I suggest we look into using zone.js to hook into all the browser points from whence code could be executed, automatically generating Airbrake.wrap closures around them.

@cesarandreu

This comment has been minimized.

Show comment
Hide comment
@cesarandreu

cesarandreu commented Jul 3, 2014

👍

@dandv

This comment has been minimized.

Show comment
Hide comment
@dandv

dandv Jul 13, 2015

That would be awesome for a "set it and forget it" setup. Get started quickly without having to add try/catch blocks everywhere.

Loggly has that feature: https://www.loggly.com/docs/javascript/

dandv commented Jul 13, 2015

That would be awesome for a "set it and forget it" setup. Get started quickly without having to add try/catch blocks everywhere.

Loggly has that feature: https://www.loggly.com/docs/javascript/

@vmihailenco

This comment has been minimized.

Show comment
Hide comment
@vmihailenco

vmihailenco Jul 14, 2015

Member

I still don't understand what should be done here. Looking at https://github.com/btford/zone.js/ integration is as simple as adding onError hook, but probably I miss something.

Loggly has that feature: https://www.loggly.com/docs/javascript/

I can't find anything about zone.js on that page. Can you please be more specific?

Member

vmihailenco commented Jul 14, 2015

I still don't understand what should be done here. Looking at https://github.com/btford/zone.js/ integration is as simple as adding onError hook, but probably I miss something.

Loggly has that feature: https://www.loggly.com/docs/javascript/

I can't find anything about zone.js on that page. Can you please be more specific?

@dandv

This comment has been minimized.

Show comment
Hide comment
@dandv

dandv Jul 14, 2015

As far as I'm concerned, it looks like just adding an onerror handler, similar to the catchall parameter for LogEntries, will do the trick.

Maybe @duncanbeevers can comment on the zone.js idea?

dandv commented Jul 14, 2015

As far as I'm concerned, it looks like just adding an onerror handler, similar to the catchall parameter for LogEntries, will do the trick.

Maybe @duncanbeevers can comment on the zone.js idea?

@szepeviktor

This comment has been minimized.

Show comment
Hide comment
@szepeviktor

szepeviktor Jul 31, 2015

I think this is the minimalist implementation:

window.onerror = function(msg, url, line, col, error) {
   // Note that col & error are new to the HTML 5 spec and may not be 
   // supported in every browser.  It worked for me in Chrome.
   var extra = !col ? '' : '\ncolumn: ' + col;
   extra += !error ? '' : '\nerror: ' + error;

   // You can view the information in an alert to see things working like this:
   alert("Error: " + msg + "\nurl: " + url + "\nline: " + line + extra);

   // TODO: Report this error via ajax so you can keep track
   //       of what pages have JS issues

   var suppressErrorAlert = true;
   // If you return true, then error alerts (like in older versions of 
   // Internet Explorer) will be suppressed.
   return suppressErrorAlert;
};

And there is https://github.com/stacktracejs/stacktrace.js

szepeviktor commented Jul 31, 2015

I think this is the minimalist implementation:

window.onerror = function(msg, url, line, col, error) {
   // Note that col & error are new to the HTML 5 spec and may not be 
   // supported in every browser.  It worked for me in Chrome.
   var extra = !col ? '' : '\ncolumn: ' + col;
   extra += !error ? '' : '\nerror: ' + error;

   // You can view the information in an alert to see things working like this:
   alert("Error: " + msg + "\nurl: " + url + "\nline: " + line + extra);

   // TODO: Report this error via ajax so you can keep track
   //       of what pages have JS issues

   var suppressErrorAlert = true;
   // If you return true, then error alerts (like in older versions of 
   // Internet Explorer) will be suppressed.
   return suppressErrorAlert;
};

And there is https://github.com/stacktracejs/stacktrace.js

@vmihailenco

This comment has been minimized.

Show comment
Hide comment
@vmihailenco

vmihailenco Jan 31, 2017

Member

Closing since there is no understanding what should be done.

Member

vmihailenco commented Jan 31, 2017

Closing since there is no understanding what should be done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment