Page MenuHomePhabricator

Add error id generation to mw.errorLogging
Closed, ResolvedPublic2 Estimated Story Points

Description

To make it easy for users to report errors / developers to know which error is being reported, we should show the user an error id so they include it in the bug report.

  • generate an id from the error when it is caught (Sentry just created a random UUID so we should go with that)
  • log it to the console for automatically caught exceptions
  • for manually caught exceptions, provide a method in mw.errorLogging by which developers can send the exception to Sentry and get back an error id. While the reporting itself is async, return the error id should not be.

This will also help with tracking down whether Sentry properly collects all errors.

Related Objects

StatusSubtypeAssignedTask
DeclinedNone
ResolvedTgr
ResolvedGilles
OpenNone
DeclinedNone
DeclinedTgr
ResolvedTgr
ResolvedTgr
ResolvedTgr
Resolvedjlinehan
ResolvedTgr
DeclinedTgr
DeclinedTgr
DeclinedTgr
ResolvedTgr
DeclinedTgr
ResolvedTgr
ResolvedTgr
ResolvedKrinkle
DeclinedNone
OpenNone
ResolvedTgr
DeclinedNone
OpenNone
InvalidNone
DeclinedTgr
ResolvedTgr
Resolvedjcrespo
ResolvedTgr

Event Timeline

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

Change 192695 had a related patch set uploaded (by Gergő Tisza):
Add error id and manual reporting to mw.errorLogging

https://gerrit.wikimedia.org/r/192695

Change 192696 had a related patch set uploaded (by Gergő Tisza):
Test module for manual error reporting

https://gerrit.wikimedia.org/r/192696

Change 192697 had a related patch set uploaded (by Gergő Tisza):
Report error id and context

https://gerrit.wikimedia.org/r/192697

Change 192697 merged by jenkins-bot:
Report error id and context

https://gerrit.wikimedia.org/r/192697

Change 192696 merged by jenkins-bot:
Test module for manual error reporting

https://gerrit.wikimedia.org/r/192696

Change 192695 abandoned by Gergő Tisza:
Add error id and manual reporting to mw.errorLogging

Reason:
Will be redone on top of https://gerrit.wikimedia.org/r/#/c/199557/

https://gerrit.wikimedia.org/r/192695

Change 199789 had a related patch set uploaded (by Gergő Tisza):
Add error id and manual reporting to mw.errorLogging

https://gerrit.wikimedia.org/r/199789

Change 200293 had a related patch set uploaded (by Gergő Tisza):
[HOLD] Log error id to console

https://gerrit.wikimedia.org/r/200293