Closed Bug 1438331 Opened 7 years ago Closed 6 years ago

Keep the last 5 debug messages in localStorage

Categories

(Taskcluster :: UI, enhancement)

enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: hassan, Unassigned)

Details

(Whiteboard: taskcluster-web)

We don't always want to show an error when something goes wrong. For example, when auth0 renewal fails, we currently use `console.error` without showing an error box since there was no user iteraction. That console error is invariably gone because the tab was closed by the time anyone notices. We want to have a way to debug those issues when users report them. For example, this happened today: <gerard-majax> is it normal that I get disconnected from taskcluster/auth0 often? like I signed in this afternoon, and now I'm again signed off One solution to that is to to keep the last 5 debug messages about auth in localStorage and show those in the "manage credentials" page.
No new localStorage interactions. All new storage will be kept in IDB. This way we can structure data and not deal with serialization.
That works as well. Would you recommend https://github.com/localForage/localForage for interacting with IDB?
Flags: needinfo?(eperelman)
If we are working with more than key-value pairs, which would seem to be the case if we are working with several rows of data, I'd recommend dexie. https://www.npmjs.com/package/dexie
Flags: needinfo?(eperelman)
I wouldn't say that we'll be working with more than key-value pairs. For debug messages, we just need to store a key 'notifications' with the value being an array of strings or objects. I think this is doable with localForage imo.
Now that I think of it, we should probably roll this into our analytics story. Tracking views, usage, errors, etc. by having them shipped off to a remote service.
Perhaps, but we need this done *now* as we are having lots of authentication failures and we have no idea why. This is useful debugging information that we need, like, yesterday.
Assignee: nobody → eperelman
Assignee: eperelman → nobody
This will be handled by reporting to sentry which has been integrated in tc-web[1]. [1] https://github.com/taskcluster/taskcluster-web/commit/6f59e5e8e5169db652db0965ddf023223031d78c
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Component: Tools → UI and Tools
You need to log in before you can comment on or make changes to this bug.