MediaWiki-Debug-LoggerComponent
ActivePublic

Members (3)

Watchers

  • This project does not have any watchers.
  • View All

Details

Description

Issues related to MediaWiki core's PSR debug logger, stats and timing services, and their configuration.

This includes:

  • PSR-3 logging: The MediaWiki\Logger namespace of classes (such as Spi and Monolog integration), and their utility functions such as wfDebugLog(), and configuration such as $wgDebugLogFile and $wgDebugLogGroups.
  • The debug toolbar.
  • The StatsdDataFactory service and its wiring.
  • The Timing class as used via RequestContext::getTiming.

For the debug profiler, refer to MediaWiki-Core-Profiler.
For the Metrics library (replacing StatsdDataFactory), refer to MediaWiki-libs-Stats.
For the shell.php and eval.php debugging tools, use the Shell & Eval column of MediaWiki-Maintenance-system.
For WMF's production infrastructure, refer to Wikimedia-Logstash.
To report production errors, use Wikimedia-production-error.

Recent Activity

Today

Umherirrender added a project to T364682: debug toolbar not readable in night mode: dark-mode.
Thu, Jul 4, 10:13 PM · dark-mode, MediaWiki-Debug-Logger

Mon, Jul 1

gerritbot added a comment to T350094: Enable verbose logging without installing the WikimediaDebug extension.

Change #1024932 abandoned by Gergő Tisza:

[operations/mediawiki-config@master] Profiler: Handle X-Wikimedia-Debug cookie

Reason:

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

Mon, Jul 1, 8:41 PM · Patch-For-Review, MW-1.42-notes (1.42.0-wmf.23; 2024-03-19), MediaWiki-Platform-Team, MediaWiki-Debug-Logger, observability

Tue, Jun 25

larissagaulia moved T350094: Enable verbose logging without installing the WikimediaDebug extension from Current Sprint to Blocked/waiting on the MediaWiki-Platform-Team board.
Tue, Jun 25, 3:02 PM · Patch-For-Review, MW-1.42-notes (1.42.0-wmf.23; 2024-03-19), MediaWiki-Platform-Team, MediaWiki-Debug-Logger, observability

Mon, Jun 24

Maintenance_bot removed a project from T228838: Consider enabling all MW log channels by default for WMF: Patch-For-Review.
Mon, Jun 24, 7:30 AM · Release-Engineering-Team (Radar), observability, Platform Engineering (Icebox), Developer Productivity, MediaWiki-Debug-Logger
hashar placed T228838: Consider enabling all MW log channels by default for WMF up for grabs.
Mon, Jun 24, 7:19 AM · Release-Engineering-Team (Radar), observability, Platform Engineering (Icebox), Developer Productivity, MediaWiki-Debug-Logger
gerritbot added a comment to T228838: Consider enabling all MW log channels by default for WMF.

Change #1018637 abandoned by Hashar:

[operations/mediawiki-config@master] logging: default to log any error

Reason:

Abandoning for now, but I might revisit one day.

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

Mon, Jun 24, 7:19 AM · Release-Engineering-Team (Radar), observability, Platform Engineering (Icebox), Developer Productivity, MediaWiki-Debug-Logger

Jun 3 2024

Umherirrender added a comment to T366469: DebugToolbar almost completely hides fullscreen toggle button on Vector skin.

Special:Preferences is also affected since the sticky footer is there (cd150ad0f1ca925a0904fb24b6585a9f34655ff4)

Jun 3 2024, 7:44 PM · Desktop Improvements (Vector 2022) (Tracking), MediaWiki-Debug-Logger
xSavitar updated the task description for T366469: DebugToolbar almost completely hides fullscreen toggle button on Vector skin.
Jun 3 2024, 7:36 PM · Desktop Improvements (Vector 2022) (Tracking), MediaWiki-Debug-Logger
Jdlrobson edited projects for T366469: DebugToolbar almost completely hides fullscreen toggle button on Vector skin, added: Desktop Improvements (Vector 2022) (Tracking); removed Desktop Improvements (Vector 2022).

The full screen toggle will be removed as part of T362148, however this area is also used by other extensions e.g. Growth uses it to add a help icon https://gerrit.wikimedia.org/g/mediawiki/extensions/GrowthExperiments/+/60eb364ddbc4cd8814f00ab246cd442c0b9dc177/modules/ext.growthExperiments.HelpPanel/HelpPanelCta.js#39

Jun 3 2024, 3:04 PM · Desktop Improvements (Vector 2022) (Tracking), MediaWiki-Debug-Logger
xSavitar created T366469: DebugToolbar almost completely hides fullscreen toggle button on Vector skin.
Jun 3 2024, 12:51 PM · Desktop Improvements (Vector 2022) (Tracking), MediaWiki-Debug-Logger

May 15 2024

ReleaseTaggerBot added a project to T193472: Log suppressed errors with level=DEBUG: MW-1.43-notes (1.43.0-wmf.6; 2024-05-21).
May 15 2024, 12:00 PM · MW-1.43-notes (1.43.0-wmf.6; 2024-05-21), MediaWiki-Platform-Team, MediaWiki-Debug-Logger
Krinkle closed T193472: Log suppressed errors with level=DEBUG as Resolved.

@Bewfip Thanks for the reminder!

May 15 2024, 11:48 AM · MW-1.43-notes (1.43.0-wmf.6; 2024-05-21), MediaWiki-Platform-Team, MediaWiki-Debug-Logger
gerritbot added a comment to T193472: Log suppressed errors with level=DEBUG.

Change #1030999 merged by jenkins-bot:

[mediawiki/core@master] exception: Remove "error-json" debug log channel

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

May 15 2024, 11:24 AM · MW-1.43-notes (1.43.0-wmf.6; 2024-05-21), MediaWiki-Platform-Team, MediaWiki-Debug-Logger

May 13 2024

Krinkle moved T193472: Log suppressed errors with level=DEBUG from Inbox, needs triage to Current Sprint on the MediaWiki-Platform-Team board.
May 13 2024, 2:58 PM · MW-1.43-notes (1.43.0-wmf.6; 2024-05-21), MediaWiki-Platform-Team, MediaWiki-Debug-Logger
Krinkle claimed T193472: Log suppressed errors with level=DEBUG.
May 13 2024, 2:58 PM · MW-1.43-notes (1.43.0-wmf.6; 2024-05-21), MediaWiki-Platform-Team, MediaWiki-Debug-Logger
gerritbot added a comment to T193472: Log suppressed errors with level=DEBUG.

Change #1030999 had a related patch set uploaded (by Krinkle; author: Krinkle):

[mediawiki/core@master] exception: Remove "error-json" debug log channel

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

May 13 2024, 2:58 PM · MW-1.43-notes (1.43.0-wmf.6; 2024-05-21), MediaWiki-Platform-Team, MediaWiki-Debug-Logger
Bewfip added a comment to T193472: Log suppressed errors with level=DEBUG.

MWExceptionHandler::logError currently (as of 1.41.1) invokes MWExceptionHandler::jsonSerializeException regardless of whether the error is suppressed by for example AtEase::suppressWarnings. It will in turn invoke FormatJson::encode to serialize the exception. Third-party installations of mediawiki are probably never configured to print the "error-json" log channel. The time spent for json serialization is therefore wasted.

May 13 2024, 2:41 PM · MW-1.43-notes (1.43.0-wmf.6; 2024-05-21), MediaWiki-Platform-Team, MediaWiki-Debug-Logger
larissagaulia moved T348801: No warning logged in Wikimedia production when CentralAuth tries to send headers after body from Inbox, needs triage to Backlog: non-prioritized on the MediaWiki-Platform-Team board.
May 13 2024, 11:21 AM · MediaWiki-Platform-Team, MediaWiki-extensions-CentralAuth, MediaWiki-Debug-Logger

May 12 2024

gerritbot added a comment to T350094: Enable verbose logging without installing the WikimediaDebug extension.

Change #1030592 had a related patch set uploaded (by Gergő Tisza; author: Gergő Tisza):

[mediawiki/extensions/WikimediaEvents@master] WikimediaDebug: Add a note about having matching code in puppet

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

May 12 2024, 12:21 PM · Patch-For-Review, MW-1.42-notes (1.42.0-wmf.23; 2024-03-19), MediaWiki-Platform-Team, MediaWiki-Debug-Logger, observability
gerritbot added a comment to T350094: Enable verbose logging without installing the WikimediaDebug extension.

Change #1030591 had a related patch set uploaded (by Gergő Tisza; author: Gergő Tisza):

[operations/puppet@production] varnish: Copy value of X-Wikimedia-Debug cookie to header

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

May 12 2024, 12:14 PM · Patch-For-Review, MW-1.42-notes (1.42.0-wmf.23; 2024-03-19), MediaWiki-Platform-Team, MediaWiki-Debug-Logger, observability
Tgr added a comment to T350094: Enable verbose logging without installing the WikimediaDebug extension.

The current code uses WebResponse::setCookie() which will result in cookie values like backend%3Dmwdebug1001.eqiad.wmnet%3Blog%3Bexpire%3D1715464158. Varnish itself does not need to know the values of the various flags within the cookie, but it does need to decode them because ATS is expecting unencoded plain text in the X-Wikimedia-Debug header (the logic is here). I think we are fine decoding only ; and =, as long as we are careful not to make changes on the PHP side.

May 12 2024, 12:02 PM · Patch-For-Review, MW-1.42-notes (1.42.0-wmf.23; 2024-03-19), MediaWiki-Platform-Team, MediaWiki-Debug-Logger, observability
gerritbot added a comment to T350094: Enable verbose logging without installing the WikimediaDebug extension.

Change #1030590 had a related patch set uploaded (by Gergő Tisza; author: Gergő Tisza):

[operations/mediawiki-config@master] debug: Enable Special:WikimediaDebug

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

May 12 2024, 11:37 AM · Patch-For-Review, MW-1.42-notes (1.42.0-wmf.23; 2024-03-19), MediaWiki-Platform-Team, MediaWiki-Debug-Logger, observability

May 11 2024

Umherirrender created T364682: debug toolbar not readable in night mode.
May 11 2024, 7:19 PM · dark-mode, MediaWiki-Debug-Logger

May 3 2024

Tgr added a comment to T348801: No warning logged in Wikimedia production when CentralAuth tries to send headers after body.

I suspect whether the error is happening at all depends on MediaWiki and/or Apache output buffering config (e.g. $wgDisableOutputCompression, mod_deflate). But T347889 was happening in production (it broke central autologin), it just did not get logged.

May 3 2024, 1:14 PM · MediaWiki-Platform-Team, MediaWiki-extensions-CentralAuth, MediaWiki-Debug-Logger
kostajh added a comment to T348801: No warning logged in Wikimedia production when CentralAuth tries to send headers after body.

I see this error in my local environment (PHP 8.1, Apache) and am confused as to 1) why we don't see this error logged in production and 2) why this doesn't cause more serious issues related to central login, as the console error (Uncaught SyntaxError: Unexpected token '<' (at checkLoggedIn?type=script&wikiid=enwiki:2:223)) indicates that checkLoggedIn JavaScript doesn't run successfully.

May 3 2024, 12:50 PM · MediaWiki-Platform-Team, MediaWiki-extensions-CentralAuth, MediaWiki-Debug-Logger
Tgr added a project to T348801: No warning logged in Wikimedia production when CentralAuth tries to send headers after body: MediaWiki-extensions-CentralAuth.
May 3 2024, 12:31 PM · MediaWiki-Platform-Team, MediaWiki-extensions-CentralAuth, MediaWiki-Debug-Logger

Apr 29 2024

Krinkle added a comment to T350094: Enable verbose logging without installing the WikimediaDebug extension.

The disadvantage is that (AFAIK) Varnish is pretty bad at cookie handling, so parsing the Cookie header and decoding the cookie value would have to be done manually, and if it doesn't fully match how PHP does it at the other end, weird things could happen. […]

Apr 29 2024, 10:00 PM · Patch-For-Review, MW-1.42-notes (1.42.0-wmf.23; 2024-03-19), MediaWiki-Platform-Team, MediaWiki-Debug-Logger, observability
Tgr added a comment to T350094: Enable verbose logging without installing the WikimediaDebug extension.

Yeah I have been pondering that. The disadvantage is that (AFAIK) Varnish is pretty bad at cookie handling, so parsing the Cookie header and decoding the cookie value would have to be done manually, and if it doesn't fully match how PHP does it at the other end, weird things could happen. But it would avoid a lot of complexity - the X-Wikimedia-Debug header is handled in Varnish, ATS, haproxy and envoy, some of those are also used on beta, altogether it's over a dozen different places in the code that would have to be updated.

Apr 29 2024, 9:42 PM · Patch-For-Review, MW-1.42-notes (1.42.0-wmf.23; 2024-03-19), MediaWiki-Platform-Team, MediaWiki-Debug-Logger, observability
Krinkle added a comment to T350094: Enable verbose logging without installing the WikimediaDebug extension.

Change #1024932 had a related patch set uploaded (by Gergő Tisza; author: Gergő Tisza):

[operations/mediawiki-config@master] Profiler: Handle X-Wikimedia-Debug cookie

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

Apr 29 2024, 8:01 PM · Patch-For-Review, MW-1.42-notes (1.42.0-wmf.23; 2024-03-19), MediaWiki-Platform-Team, MediaWiki-Debug-Logger, observability

Apr 28 2024

gerritbot added a project to T350094: Enable verbose logging without installing the WikimediaDebug extension: Patch-For-Review.
Apr 28 2024, 11:36 AM · Patch-For-Review, MW-1.42-notes (1.42.0-wmf.23; 2024-03-19), MediaWiki-Platform-Team, MediaWiki-Debug-Logger, observability
gerritbot added a comment to T350094: Enable verbose logging without installing the WikimediaDebug extension.

Change #1024932 had a related patch set uploaded (by Gergő Tisza; author: Gergő Tisza):

[operations/mediawiki-config@master] Profiler: Handle X-Wikimedia-Debug cookie

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

Apr 28 2024, 11:36 AM · Patch-For-Review, MW-1.42-notes (1.42.0-wmf.23; 2024-03-19), MediaWiki-Platform-Team, MediaWiki-Debug-Logger, observability

Apr 25 2024

Stashbot added a comment to T228838: Consider enabling all MW log channels by default for WMF.

Mentioned in SAL (#wikimedia-operations) [2024-04-25T08:02:13Z] <hashar@deploy1002> Finished scap: Backport for [[gerrit:1023441|logging: do not explicitly set blackhole handler (T228838)]] (duration: 16m 17s)

Apr 25 2024, 8:02 AM · Release-Engineering-Team (Radar), observability, Platform Engineering (Icebox), Developer Productivity, MediaWiki-Debug-Logger
Stashbot added a comment to T228838: Consider enabling all MW log channels by default for WMF.

Mentioned in SAL (#wikimedia-operations) [2024-04-25T07:48:43Z] <hashar@deploy1002> hashar: Backport for [[gerrit:1023441|logging: do not explicitly set blackhole handler (T228838)]] synced to the testservers (https://wikitech.wikimedia.org/wiki/Mwdebug)

Apr 25 2024, 7:48 AM · Release-Engineering-Team (Radar), observability, Platform Engineering (Icebox), Developer Productivity, MediaWiki-Debug-Logger
Stashbot added a comment to T228838: Consider enabling all MW log channels by default for WMF.

Mentioned in SAL (#wikimedia-operations) [2024-04-25T07:45:56Z] <hashar@deploy1002> Started scap: Backport for [[gerrit:1023441|logging: do not explicitly set blackhole handler (T228838)]]

Apr 25 2024, 7:46 AM · Release-Engineering-Team (Radar), observability, Platform Engineering (Icebox), Developer Productivity, MediaWiki-Debug-Logger
gerritbot added a comment to T228838: Consider enabling all MW log channels by default for WMF.

Change #1023441 merged by jenkins-bot:

[operations/mediawiki-config@master] logging: do not explicitly set blackhole handler

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

Apr 25 2024, 7:45 AM · Release-Engineering-Team (Radar), observability, Platform Engineering (Icebox), Developer Productivity, MediaWiki-Debug-Logger

Apr 23 2024

gerritbot added a comment to T228838: Consider enabling all MW log channels by default for WMF.

Change #1023441 had a related patch set uploaded (by Hashar; author: Hashar):

[operations/mediawiki-config@master] logging: do not explicitly set blackhole handler

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

Apr 23 2024, 2:36 PM · Release-Engineering-Team (Radar), observability, Platform Engineering (Icebox), Developer Productivity, MediaWiki-Debug-Logger
hashar added a comment to T118057: Monolog throws RuntimeException on JSON encoding failure.

I am revisiting this task 9 years later.

Apr 23 2024, 2:00 PM · Upstream, User-bd808, Patch-For-Review, MediaWiki-Debug-Logger
Stashbot added a comment to T228838: Consider enabling all MW log channels by default for WMF.

Mentioned in SAL (#wikimedia-operations) [2024-04-23T09:44:39Z] <hashar@deploy1002> Finished scap: Backport for [[gerrit:1019253|logging: always register udp2log handlers (T228838)]] (duration: 15m 11s)

Apr 23 2024, 9:44 AM · Release-Engineering-Team (Radar), observability, Platform Engineering (Icebox), Developer Productivity, MediaWiki-Debug-Logger
Stashbot added a comment to T228838: Consider enabling all MW log channels by default for WMF.

Mentioned in SAL (#wikimedia-operations) [2024-04-23T09:31:51Z] <hashar@deploy1002> hashar: Backport for [[gerrit:1019253|logging: always register udp2log handlers (T228838)]] synced to the testservers (https://wikitech.wikimedia.org/wiki/Mwdebug)

Apr 23 2024, 9:32 AM · Release-Engineering-Team (Radar), observability, Platform Engineering (Icebox), Developer Productivity, MediaWiki-Debug-Logger
Stashbot added a comment to T228838: Consider enabling all MW log channels by default for WMF.

Mentioned in SAL (#wikimedia-operations) [2024-04-23T09:29:27Z] <hashar@deploy1002> Started scap: Backport for [[gerrit:1019253|logging: always register udp2log handlers (T228838)]]

Apr 23 2024, 9:29 AM · Release-Engineering-Team (Radar), observability, Platform Engineering (Icebox), Developer Productivity, MediaWiki-Debug-Logger
gerritbot added a comment to T228838: Consider enabling all MW log channels by default for WMF.

Change #1019253 merged by jenkins-bot:

[operations/mediawiki-config@master] logging: always register udp2log handlers

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

Apr 23 2024, 9:26 AM · Release-Engineering-Team (Radar), observability, Platform Engineering (Icebox), Developer Productivity, MediaWiki-Debug-Logger

Apr 19 2024

kostajh added a comment to T348801: No warning logged in Wikimedia production when CentralAuth tries to send headers after body.

I see this error in my local environment (PHP 8.1, Apache) and am confused as to 1) why we don't see this error logged in production and 2) why this doesn't cause more serious issues related to central login, as the console error (Uncaught SyntaxError: Unexpected token '<' (at checkLoggedIn?type=script&wikiid=enwiki:2:223)) indicates that checkLoggedIn JavaScript doesn't run successfully.

Apr 19 2024, 7:55 AM · MediaWiki-Platform-Team, MediaWiki-extensions-CentralAuth, MediaWiki-Debug-Logger

Apr 15 2024

Krinkle triaged T350094: Enable verbose logging without installing the WikimediaDebug extension as Medium priority.
Apr 15 2024, 3:27 PM · Patch-For-Review, MW-1.42-notes (1.42.0-wmf.23; 2024-03-19), MediaWiki-Platform-Team, MediaWiki-Debug-Logger, observability

Apr 12 2024

gerritbot added a comment to T228838: Consider enabling all MW log channels by default for WMF.

Change #1019253 had a related patch set uploaded (by Hashar; author: Hashar):

[operations/mediawiki-config@master] logging: always register udp2log handlers

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

Apr 12 2024, 9:50 AM · Release-Engineering-Team (Radar), observability, Platform Engineering (Icebox), Developer Productivity, MediaWiki-Debug-Logger

Apr 11 2024

hashar claimed T228838: Consider enabling all MW log channels by default for WMF.

After five years, it is never too late. This has hit us again this week while I was deploying the MediaWiki train and I guess it is finally time to address it and log all errors.

Apr 11 2024, 4:45 AM · Release-Engineering-Team (Radar), observability, Platform Engineering (Icebox), Developer Productivity, MediaWiki-Debug-Logger

Apr 10 2024

gerritbot added a project to T228838: Consider enabling all MW log channels by default for WMF: Patch-For-Review.
Apr 10 2024, 8:04 AM · Release-Engineering-Team (Radar), observability, Platform Engineering (Icebox), Developer Productivity, MediaWiki-Debug-Logger
gerritbot added a comment to T228838: Consider enabling all MW log channels by default for WMF.

Change #1018637 had a related patch set uploaded (by Hashar; author: Hashar):

[operations/mediawiki-config@master] logging: default to log any error

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

Apr 10 2024, 8:04 AM · Release-Engineering-Team (Radar), observability, Platform Engineering (Icebox), Developer Productivity, MediaWiki-Debug-Logger

Apr 2 2024

gerritbot added a comment to T126989: MediaWiki logging & encryption.

Change #492390 abandoned by Herron:

[operations/puppet@production] rsyslog: change udp_localhost_compat to define, add mwlog_compat

Reason:

spring cleaning -- stale patch

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

Apr 2 2024, 2:05 PM · Observability-Logging, observability, MW-1.33-notes (1.33.0-wmf.24; 2019-04-02), Patch-For-Review, Wikimedia-Logstash, MediaWiki-Debug-Logger, SRE

Mar 19 2024

bd808 updated the task description for T142313: Add global information to debug logger context.
Mar 19 2024, 10:57 PM · Platform Team Legacy (Watching / External), Services (watching), User-Tgr, Developer-Wishlist (2017), MediaWiki-Debug-Logger
Krinkle renamed T142313: Add global information to debug logger context from Add global logging context to Add global information to debug logger context.
Mar 19 2024, 6:11 PM · Platform Team Legacy (Watching / External), Services (watching), User-Tgr, Developer-Wishlist (2017), MediaWiki-Debug-Logger