jsErrLog
jsErrLog copied to clipboard
Should the unique identifier be the same for all reports on one page?
I wonder if it would be better to have the same uid when more than one error is reported on a page for one user (e.g. the user causes 2 errors and then reloads the page, then we get 4 reports that are not properly connected since they have 4 different uids).
Interesting idea. I have resisted dropping a cookie on the end users machine as that adds a complication, but I guess I could make the guid a session cookie without triggering too many red flags...
actually I thought it would be enough to have a single guid for each page instance so that the errors with one page can be correlated, a session cookie isn't really necessary in most cases. Or you could add a method to set an identifier for the specific page instance or for the user (which would optional and could just be a hash of a already existing session). For the default case I think the guid should be stored in the jserr object instance so that it is renewed when the page is reloaded, but is the same for methods called on the same page.
when the guid is the same for all errors on a given page, it would also be useful to have a sequence counter for each error report so that you can sort that later. (assuming that the timestamps stored are with seconds resolution, the errors may appear with the same timestamp)
just noticed that the error reports already have a sequence counter due to the i parameter, I'm still for keeping the id the same for all errors in one page.