Page MenuHomePhabricator

MediaWiki state change streams- add access_method & platform details
Open, Needs TriagePublic

Description

Incremental MWH needs information about the access method and platform(?) (e.g. Desktop, Mobile Web, API? Mobile App? iOS app). We should be able to include this information in mediawiki.page_change and other relevant MediaWiki state change streams when they are emitted from EventBus.

See also T419019: [Spike] Adding access_method metadata to moderator action event streams

Done is

Event Timeline

Ottomata renamed this task from mediawiki.page_change event - add platform field to mediawiki.page_change event - add access_method (AKA platform) field.May 11 2026, 4:23 PM
Ottomata updated the task description. (Show Details)
Ottomata updated the task description. (Show Details)
Ottomata renamed this task from mediawiki.page_change event - add access_method (AKA platform) field to mediawiki.page_change event - add access_method & platform details.May 11 2026, 6:41 PM
Ottomata updated the task description. (Show Details)

This task looks more difficult than I originally expected. Slack thread.

  • we need to define access_method and platform well. What is expected? What do we need?
  • Currently these are variously handled by various code logic (HQL, MobileFrontend, Varnish, etc.) mostly based on User-Agent. There is no canonical definition.

More details in

Ottomata renamed this task from mediawiki.page_change event - add access_method & platform details to MediaWiki state change streams- add access_method & platform details.Wed, Jun 17, 5:25 PM

The DPE definition of access_method is pretty consistent:

  • mobile_app: user agent was set by our apps
  • mobile_web: X Analytics header has ismobile
  • desktop: everything else

sources: refinery, schemas, event enrichment

So it seems to me that if we used this definition we would:

  • provide a benefit now
  • agree with other datasets
  • not add significant tech debt (just one more place to change, if needed, will show up in codesearch)

As far as where ismobile is available, it must be available as HA Proxy produces to our webrequest topic. But this comment makes it seem like it's only set after MW sends a response.

@Milimetric but also this exists?

Looks like MW client sent prometheus metrics (in grafana) count Commons App requests as is_mobile, but the DPE definition would count CommonsApp requests as desktop?

Also, there is no info about whether a desktop request is via an API endpoint. desktop really is quite misleading as to what it covers.

Before encoding the DPE definition of access_method into MediaWiki state change events, I think it might be worth a second look to make sure we are consistently modeling what folks actually want/need/mean when they say things like 'this was a desktop request'.

Does it make sense to classify an edit made by the desktop browser UI, an edit made by the Commons App, an edit made by the Action API, and an edit made by the MW REST API all as access_method='desktop'?

@Milimetric actually, let's have this convo on T419019: [Spike] Adding access_method metadata to moderator action event streams. I think there are more relevant eyes over there. I'll summarize our last 2 comments there and continue the discussion.