As chatted with Ed about.
Description
Related Objects
- Mentioned In
- T233331: How to detect errors on VE
T167699: [EPIC] Enable JS error reporting in the mobile website - Mentioned Here
- T47514: ResourceLoader: Implement support for Source Maps
T91347: EventLogging query strings are truncated to 1014 bytes by ?(varnishncsa? or udp packet size?)
T136230: Get UploadWizard's uncaught exceptions on Commons to fewer than 50/day
Event Timeline
@MarkTraceur, mind if Ed picks your brains about how this works and how he can set it up?
I think Sentry is still vaporware? I heard @Tgr is planning to work on it at some point in the future, when everything AuthManager-related is completely tied up.
UploadWizard logs client-side JS errors using a simple EventLogging schema (https://meta.wikimedia.org/wiki/Schema:UploadWizardExceptionFlowEvent) and core's 'global.error' event, which was actually developed for Sentry, I think (resources/src/mediawiki/mediawiki.errorLogger.js). The actual code is just a couple lines (uw.EventFlowLogger.js#L178-L186 and #L87-L91). You can view the data in the UploadWizardExceptionFlowEvent_11772722 table on stat1003.
Unfortunately this gives us rather limited information. The error messages are also wildly inconsistent between browsers, even for the same issue, and often arrive localized to the user's language. We get error messages from crappy browser extensions. There are also no stack traces, just the error message. (T136230 has some analysis. It's still a lot better than nothing.)
The last part is because the length of data you can log via EventLogging is severely limited (our code comments reference T91347, but even with that fixed, there's a hardcoded limit on the URL length of 2000 characters: ext.eventLogging.core.js#L57). If you develop some method of compressing/simplifying the stack traces (it might be a bit of a pain because of browser inconsistencies), or splitting them between multiple log events (probably easier, just a chore to write), I'd probably want to use it in UploadWizard too.
I'll probably get back to it after Wikimania.
The error messages are also wildly inconsistent between browsers, even for the same issue, and often arrive localized to the user's language.
Only logging the error when the browser language is English would probably help to cut down the noise.
If you develop some method of compressing/simplifying the stack traces (it might be a bit of a pain because of browser inconsistencies), or splitting them between multiple log events (probably easier, just a chore to write), I'd probably want to use it in UploadWizard too.
Minified stack traces are not useful. https://gerrit.wikimedia.org/r/#/c/156544/ might help on some browsers; the generic solution would be T47514: ResourceLoader: Implement support for Source Maps.
This looks resolved to me. Please feel free to reopen if I've missed something but these are now coming in thick and fast on logstash.