question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Use zone.js to instrument browser interaction points

See original GitHub issue

@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.

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
vmihailencocommented, Jan 31, 2017

Closing since there is no understanding what should be done.

0reactions
szepeviktorcommented, 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

Read more comments on GitHub >

github_iconTop Results From Across the Web

What Is Zone.js and How Can I Use It? - Medium
Let's begin by understanding how zone.js fiddles slightly with some browser (or I should actually say platform) APIs. During initialization of ...
Read more >
ZoneTracker: Tracking JavaScript Performance with Zone.js
To ensure a great experience, we track frame rate and UI stalls. This article describes how we leverage an existing library, Zone.js, ...
Read more >
Web tracer, zone context manager and User Interaction plugin ...
This can allow all the plugins and the zone context manager to use whatever implementation of Zone is used by the app.
Read more >
How Angular uses NgZone/Zone.js for Dirty Checking
In this post we're going to learn about how the Zone.js execution context helps us track and intercept async operations like DOM events, ......
Read more >
Zone.js - Rangle.io : Angular Training
Zone.js ... ​Zone.js provides a mechanism, called zones, for encapsulating and intercepting asynchronous activities in the browser (e.g. setTimeout , , promises).
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found