The Growth team has a Logstash dashboard which identifies PHP errors likely related to code maintained by the team, by filtering on namespace names in stack traces. It would be nice to have something similar for JS errors. Unfortunately, file names in JS stack traces are not useful due to ResourceLoader minification (fixing that is T47514: ResourceLoader: Implement support for Source Maps but it requires a lot of work), so the easy approach of matching Growth-maintained extensions' script roots to the stack trace doesn't work. Things that we could try instead:
- For extensions where most features are related to a special page (such as Special:Homepage for GrowthExperiments), filter for errors happening on that page. This would require T266504: Include canonical special page name for JS error reports.
- Get a list of all classes used in our code (probably doable with consistent jsdoc annotations and some simple regex), and match all errors where that class name appears in the stack trace. Class names are not unique, but in practice they might be unique enough. This wouldn't capture errors happening outside classes or in standalone functions, but there's not that many of those, and they could be refactored away relatively easily.