jsErrLog icon indicating copy to clipboard operation
jsErrLog copied to clipboard

Should the unique identifier be the same for all reports on one page?

Open alexlehm opened this issue 11 years ago • 4 comments

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

alexlehm avatar Nov 26 '13 22:11 alexlehm

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

Offbeatmammal avatar Nov 30 '13 04:11 Offbeatmammal

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.

alexlehm avatar Nov 30 '13 11:11 alexlehm

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)

alexlehm avatar Nov 30 '13 11:11 alexlehm

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.

alexlehm avatar Mar 05 '14 08:03 alexlehm