Last modified: 2013-11-21 21:08:33 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T54209, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 52209 - wmerrors should log fatals in a machine-readable format
wmerrors should log fatals in a machine-readable format
Status: NEW
Product: Wikimedia
Classification: Unclassified
General/Unknown (Other open bugs)
wmf-deployment
All All
: Normal enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-29 05:19 UTC by Ori Livneh
Modified: 2013-11-21 21:08 UTC (History)
5 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Ori Livneh 2013-07-29 05:19:15 UTC
MediaWiki fatals occurring on the production cluster are formatted and logged by 'wmerrors', a PHP extension which Tim wrote. The output format is simple and clear, and it approximates the format of exceptions logged from within MediaWiki code. It is well-suited for flat log files.

However, because the output format is not formally specified and does not adhere to a common data encoding standard, it's a bit tricky to process programmatically. It'd be nice to have some service in production that performs some intelligent grouping of fatals and produces useful reports and alerts, and to that end it'd be nice to have wmerrors output JSON instead.

This isn't a blocker because we can decode the current output format using a few simple regular expressions. But encoding at the source would be more reliable and be subject to fewer idiosyncrasies. (Example: wmerrors calls PHP's Exception::getTraceAsString, which uses ellipses to indicate truncation; it'd be better to use Exception::getTrace, scrub the 'args' item from each frame, and encode the whole thing as a JSON array.)

Once Iacda90fb is merged, it will be possible to log JSON-encoded exceptions from core, so parity between the two log formats (exception & fatal) can be maintained.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links