Page MenuHomePhabricator

Make original file/method/line information available from Javascript error logs
Open, Needs TriagePublic

Description

MediaWiki has source map support now (T47514: ResourceLoader: Implement support for Source Maps) but browsers don't have access to source maps when generating the extension stack trace so we still end up with the same ResourceLoader-ified, largely useless traces. (They are actually not useless now because you can use them to look up the original location, but it's inconvenient.) We should integrate source maps with the client-error Kibana dashboards somehow.

Event Timeline

I think there are two ways to do this:

  • JS error logging goes through a service which fetches the source maps and replaces the stack trace
  • a browser extension or Greasemonkey script or similar tool that makes the stack traces in the Kibana dashboard link to a tool that shows the original trace

Given that source maps can be serveral megabytes, the second is probably more realistic.