Page MenuHomePhabricator

Improve Javascript error logging coverage
Open, Needs TriagePublic

Description

Tracks which types of errors can be caught by Sentry.

Coverage for global error handling

See T88874

  • Old browsers: message only
  • Modern browsers
    • JS cache hit
      • Chrome/FF(/IE?): full stack (see also T90524)
      • Other: message only
    • JS cache miss: no info T508

Coverage for callback wrapping

See T85262 - not merged!, this approach has been abandoned for now.

NormalmodeDebugmode
module initsetTimeout$.ready$.event$.ajaxmisc cbmw.loaderCSSmodule initsetTimeout$.ready$.event$.ajaxmisc cbmw.loaderCSS
Chrome

Error types

  • module init: errors occuring when the JS code of the module is executed
  • setTimeout: error in a setTimeout/setInterval callback
  • $.ready: error in a jQuery onready handler ($(handler))
  • $.event: error in a jQuery event handler ($elem.click(handler) etc)
  • $.ajax: error in a jQuery AJAX callback
  • misc cb: error in an event handler / callback which is none of the above (e.g. native handler via addEventListener, native AJAX callback) - these should be caught via window.onerror
  • mw.loader: error in an mw.loader callback which is swallowed by ResourceLoader
  • CSS: error when styles are added by ResourceLoader via the IE compatibility hack (T33676)

Related Objects

StatusSubtypeAssignedTask
DeclinedNone
ResolvedTgr
ResolvedGilles
OpenNone
DeclinedNone
DeclinedTgr
ResolvedTgr
ResolvedTgr
Resolvedcsteipp
ResolvedTgr
ResolvedTgr
ResolvedTgr
Resolvedjcrespo
ResolvedAklapper
ResolvedTgr
ResolvedTgr
OpenNone
ResolvedTgr
DeclinedTgr
DeclinedTgr
DeclinedTgr
ResolvedTgr
DeclinedTgr
ResolvedTgr
ResolvedTgr
ResolvedKrinkle
DeclinedNone
OpenNone
ResolvedTgr

Event Timeline

Tgr raised the priority of this task from to Needs Triage.
Tgr updated the task description. (Show Details)
Tgr added projects: Sentry, Tracking-Neverending.
Tgr added a subscriber: Tgr.
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Tgr set Security to None.
Tgr updated the task description. (Show Details)

After some rounds of discussion, we decided to only implement global error handling for now. That catches less errors and retrieves less information about them than callback wrapping, but it is straightforward to implement and is unlikely to cause problems (while callback wrapping depends on manipulating browser and jQuery internals, which could have far-reaching consequences). Once we know what fraction of bugs fall into the classes which are not handled well by global error handling, we can revisit.

Tgr renamed this task from Improve Sentry coverage to Improve Javascript error logging coverage.Sep 17 2020, 2:05 AM

At the time of creating this task it was assumed that the server side implementation of error logging would be based on Sentry. We have eventually decided on a different implementation, so de-tagging.

Could someone answer this please?: Has this ticket been superseded by Metrics-Platform / Better Use Of Data nowadays?
Does this task still serve a purpose nowadays, or can it be closed?