Page MenuHomePhabricator

Integrate a modern debug/error display tool into MediaWiki
Open, Needs TriagePublic

Description

The MediaWiki ecosystem has some highly sophisticated loggin/debugging/error reporting tools such as the ELK stack, but they are nontrivial to set up and an effort to use (you need to go to the aggregation site and search for your error or log message, instead of just having it right on the wiki page where the error happened). It would be nice to integrate some modern error display / debug tool into MediaWiki for casual development - probably as an extension, since such tools tend to be insecure. A few possibilities:

Event Timeline

Tgr created this task.Sep 7 2015, 9:04 PM
Tgr raised the priority of this task from to Needs Triage.
Tgr updated the task description. (Show Details)
Tgr added a subscriber: Tgr.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptSep 7 2015, 9:04 PM
Restricted Application added a subscriber: StudiesWorld. · View Herald TranscriptJan 8 2016, 1:39 AM

The debug toolbar should emit all log messages to the current page, and it also works with API requests. Did you have something else in mind?

Tgr added a comment.Jan 28 2017, 2:58 AM

Errors, specifically, not normal logs. Error logger tools tend to have some nice features:

  • show code context for the stack trace
  • show detailed information about the parameters in the stack trace, with some GUI to manage the huge amount of information
  • IDE integration so that you can click on the stack trace and open the location in your editor

Also, they don't require you to enable the debug toolbar and then reproduce the error.

This proposal is selected for the Developer-Wishlist voting round and will be added to a MediaWiki page very soon. To the subscribers, or proposer of this task: please help modify the task description: add a brief summary (10-12 lines) of the problem that this proposal raises, topics discussed in the comments, and a proposed solution (if there is any yet). Remember to add a header with a title "Description," to your content. Please do so before February 5th, 12:00 pm UTC.

Tgr added a comment.Feb 15 2017, 9:54 AM

This was the fifth most popular item in the Developer Wishlist results. I might work on this (but won't fight if anyone else wants to).

Seems fairly simple: find a way to allow extensions to replace MWExceptionRenderer (hook? MediaWikiServices::redefineService? the first is ugly, the second seems a bit scary), define an interface for replacements, write an extension which uses whoops to display the error (in the wiki content area if OutputPage can be used, on the full page otherwise).

Rical added a subscriber: Rical.Feb 15 2017, 11:33 AM
mmodell added a subscriber: mmodell.Mar 3 2017, 9:24 AM

Change 355033 had a related patch set uploaded (by Gergő Tisza; owner: Gergő Tisza):
[mediawiki/vagrant@master] Add whoops role

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

Change 355061 had a related patch set uploaded (by Gergő Tisza; owner: Gergő Tisza):
[mediawiki/core@master] Turn MWExceptionRenderer into a service

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

Change 355062 had a related patch set uploaded (by Gergő Tisza; owner: Gergő Tisza):
[mediawiki/extensions/Whoops@master] Create extension files

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

Change 355063 had a related patch set uploaded (by Gergő Tisza; owner: Gergő Tisza):
[integration/config@master] Set up CI for Whoops extension

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

Change 355063 merged by jenkins-bot:
[integration/config@master] Set up CI for Whoops extension

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

Change 355033 merged by jenkins-bot:
[mediawiki/vagrant@master] Add whoops role

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

Tgr moved this task from Backlog to Pending on the User-Tgr board.Jun 12 2017, 12:11 PM

In relation to T158149: Find an owner for top 10 Developer Wishlist 2017 proposals, I dare to ask: what is the current status? :)

Tgr added a comment.Sep 12 2017, 3:42 PM

See Whoops and https://gerrit.wikimedia.org/r/#/c/355062/. Needs some more work, I'm pretty confident I'll get it done by the end of the year.

Rical removed a subscriber: Rical.Jul 12 2018, 3:41 PM