Page MenuHomePhabricator

Prepare mediawiki-client-error Logstash dashboards for mobile subdomain sunsetting
Closed, ResolvedPublic

Description

This task represents Prep #2 of RFC: Mobile domain sunsetting, and is a blocker to WE6.4.4 (FY25-26 Q1), as tracked by the parent task T214998: RFC: Serve mobile and desktop variants through the same URL (unified mobile routing).

  1. Ensure we differentiate in Logstash between error events from mobile and desktop. The Web team currently uses a domain name regex in Logstash to find mobile errors. Jon recommends we add a "skin" or "isMobile" field to the event schema for client errors. This will cost ~ 1 week, as it will involve changes in multiple places, and coordinating between Data Engineering and Web team.

The clientError instrument in the WikimediaEvents extension currently logs a skin. This might suffice if the current Logstash filter is mainly aiming to identify issues with Minerva's JavaScript payloads. The errors have stack traces to verify which code base it comes from (e.g. Minerva, RelatedArticles, MobileFrontend, etc) and my understanding from Jon is that long-term we hope to phase out MobileFrontend, at which point there would no longer be a single boolean distinction between code for mobile and everything else. Some of the features may still exist of course, but they'd be like any other feature and would need to be filtered by stack trace, wiki, load.php URL, and/or user-agent; as other teams do today already.

Having said that, if an isMobile field is desired in the interim, we can add it now. The rollout is still a few weeks away.

Scope

  • Determine what events the team regularly splits by mobile/non-mobile domain today.
  • Document in this task what the team needs from those events, and how we can accomplish that without a mobile domain.
  • Make changes in event instrumentation and/or in Logstash (if needed).

Event Timeline

@egardner @SToyofuku-WMF given the timeline and this being a blocker for WE6.4.4 could you talk to your teams about what they need?

Jdlrobson-WMF changed the task status from Open to Stalled.Aug 26 2025, 1:55 AM

Tagging WikimediaEvents and stalling on the outcome of the spikes. We can use this ticket if any changes are needed to WikimediaEvents client error schema.

Having said that, if an isMobile field is desired in the interim, we can add it now. The rollout is still a few weeks away.

The readers experience and readers growth team have both noted that the removal of this field from client errors would not be ideal, but it's not a blocker for further roll out provided we commit to adding a replacement field before the project spins down. I have asked them to share reasoning and impact in the spikes which are subtasks of this ticket. [Note: There are a few more concerns relating to instrumentation schemas and its proposed replacement client_platform_family which we are discussing in Slack which will also be added to the spikes once completed]

My assumption is the change to client error instrument would be needed to be done by Data-Engineering (who own the instrument) and/or MediaWiki-Platform-Team but please let me know if that assumption is incorrect.

Ottomata moved this task from Incoming (new tickets) to Tag with Radar on the Data-Engineering board.
Ottomata subscribed.

Linking relevant slack thread.

Does mediawiki.client_error have an owner? IIRC it was the old old version of Metrics Platform.

The owner is listed as Data Products in https://github.com/wikimedia/mediawiki-extensions-WikimediaEvents/blob/master/OWNERS.md#client-error-logging

For practical purposes I can submit the required patch to WikimediaEvents, but I'd need the field to be added in the schema (as I'm a bit rusty on how to do that)

Change #1193470 had a related patch set uploaded (by Jdlrobson; author: Jdlrobson):

[mediawiki/extensions/WikimediaEvents@master] Add is_mobile_frontend_enabled field to allow errors

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

Jdlrobson-WMF changed the task status from Stalled to Open.Oct 3 2025, 5:24 PM

I think this is only stalled on having a code reviewer now.

Change #1193470 merged by jenkins-bot:

[mediawiki/extensions/WikimediaEvents@master] Add is_mobile_frontend_enabled field to allow errors

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

I'm seeing this field in logstash but looks like we may need support to get it cacheable and searchable?

Screenshot 2025-10-10 at 3.46.17 PM.png (644×1 px, 141 KB)

Change #1196508 had a related patch set uploaded (by Jdlrobson; author: Jdlrobson):

[mediawiki/extensions/WikimediaEvents@master] Fix is_mobile_frontend_enabled

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

Change #1196508 merged by jenkins-bot:

[mediawiki/extensions/WikimediaEvents@master] Fix is_mobile_frontend_enabled

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

Jdlrobson-WMF claimed this task.

The field error_context.is_mobile_frontend_enabled now allows developers to distinguish traffic using MobileFrontend.

FYI, in case this is useful to you all in T304373, eventgate-logging-external events, like mediawiki.client_error are now ingested into Hive in the Data Lake. There is now an event.mediawiki_client_error Hive table