Page MenuHomePhabricator

Logstash no longer captures DB queries in debug mode
Closed, ResolvedPublic

Description

Until recently (a few weeks ago at most), if you used the WikimediaDebug extension to enable debug mode and view the logs in logstash, these logs included every DB query made by the code. This is no longer the case. DB connections are logged, query errors are logged, and memcached requests are logged, but DB queries are not, and they're one of the most valuable parts of the debug log. Please bring them back.

Steps to reproduce:

  • Enable WikimediaDebug browser extension
  • Choose mwdebug1001 (or 1002), tick the "Log" check box, and set the toggle button to "ON"
  • Go to http://en.wikipedia.org/wiki/Special:Recentchanges. This request definitely makes DB queries.
  • Click the "Debug Logs" link at the bottom
  • Try to find log entries for DB queries. There aren't any.

Event Timeline

RobH triaged this task as Medium priority.May 3 2018, 4:40 PM
RobH subscribed.

As part of SRE clinic duty, I'm reviewing all unassigned, needs triage tasks in SRE and attempting to review if any are critical, or if they are normal priority.

This task appears to (mostly) be normal priority, and I have set it such. If any one on this task disagrees, please comment and correct. Anything with a high priority or above typically requires response ahead of other items, so please ensure you have supporting documentation on why those priorities should be used. Since the use of those db queries view was useful, it may actually be a higher priority than normal.

Thanks!

@tstarling uploaded a patch:

Include SQL queries in the debug log

SQL queries are probably the most important thing to include in a debug
log. When $wgLBFactoryConf is specified, $wgDebugDumpSql has no effect
and so needs to be explicitly copied into the server flags.

https://gerrit.wikimedia.org/r/c/operations/mediawiki-config/+/701995

Krinkle assigned this task to tstarling.
Krinkle moved this task from Untriaged to Wiring for MediaWiki on the MediaWiki-libs-Rdbms board.
Krinkle edited projects, added Platform Engineering; removed SRE.