skroonenburg / appfail-javascript Goto Github PK
View Code? Open in Web Editor NEWAppfail JavaScript Reporting Module
Appfail JavaScript Reporting Module
It's one thing for AppFail server components (.NET etc) to capture 404s, but what if the page is requesting off-site resources (JS/CSS)? It would be great if we could capture 404s etc as well as failed XHR requests.
It's not possible to handle CORS as that's strictly browser only.
navigator.onLine
is relevant here in helping filter the relevance of these errors.
The errors aren't currently going anywhere!
We need to set up github pages so we can push to a public location.
Add a table indicating which browser versions support window.onerror
and online/offline
events.
This can probably be sourced using spoon.net, and posted to caniuse.com when done.
Remove the tempTestingFunction
function calls from the script, and the global
catch for JSHint.
Is the onbeforeunload
event soon enough to fire a request if the interval hasn't fired yet?
If it's not, store to localStorage
and send next time the page is loaded. How long before you invalidate an error? Revisit the site/page after 7 days and the error is no longer relevant? Drop it?
As discussed, we should expose an onbeforesend
event or something similar, so developers can parse the POST values and remove sensitive information like credit card numbers.
Sending up a flattened version of the navigator
object will expose a host of useful properties depending on browser support. From there you can do some awesome filtering. For instance:
The navigator.onLine
property will tell you if the error occured when the user was online or offline, perhaps they were attempting to access a resource while offline - so you can easily disregard or filter this error out.
Showing navigator.standalone
is useful for determining if the web app is being run as a home screen app on a device etc.
We need to decide if we're sending this properties up individually, or if sending the whole navigator
object up from the very beginning means we can retroactively add new filtering options because we have always collected the data.
We need to allow for developers to set properties (such as slug
) in the query string as well as allowing an object to be passed to the reporting module as parameters.
For example:
appfail.setup({
slug: "h19f81398fh13f",
queueInterval: 60000
});
We have to get the two working in unison, ideally in any order as well. Include the overlay before or after the reporting module.
Current namespacing has a clunky if
, this is cleaner:
window.myApp = window.myApp || {};
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.