Page MenuHomePhabricator

QA desktopwebuiactionstracking schema port to the new metrics platform
Closed, ResolvedPublic1 Estimated Story Points

Assigned To
Authored By
KSarabia-WMF
Dec 7 2023, 10:10 PM
Referenced Files
Restricted File
Mar 13 2024, 7:15 PM
Restricted File
Mar 13 2024, 7:15 PM
F42602232: image.png
Mar 13 2024, 6:28 PM
Restricted File
Mar 12 2024, 2:30 AM
Restricted File
Mar 12 2024, 2:30 AM
F42557377: image.png
Mar 11 2024, 10:54 PM
F42557355: image.png
Mar 11 2024, 10:54 PM
F42557337: image.png
Mar 11 2024, 10:54 PM

Description

Objective: To analyze the quality of the data collected with a new Metrics Platform-based instrument (mediawiki_web_ui_actions) by comparing that data to the data collected with the existing non-Metrics Platform-based instrument (desktop_web_ui_actions) and verify whether the migration to Metrics Platform can proceed or if there are any issues that need to be resolved.

Prerequisites for data QA

  • Mapping of old instrumentation to new instrumentation: LINK TO DOCUMENT
    • This is primarily driven by engineer performing the migration
    • Analyst reviews map for completeness and correctness, and contributes/assists as needed
  • Specific QA needs have been identified and are agreed upon (SEE BELOW)
      • Analyst decides in collaboration with engineers/PM whether to QA the whole instrument, or if there are key parts that should be QAed and the rest can be assumed to be okay.
      • Document the parts and the relevant queries:
    • (1) overall counts by action and sub-action (if applicable)
    • if relevant (2) counts by specific identifiers (e.g. by session)
    • NOTE: these queries will almost always be limited by time in some way
  • New instrument has been deployed and activated (Link to Phab task)
      • Engineer has verified that events are flowing in and that the instrument is not producing schema validation errors.
    • Verify that events are flowing in:
      • EventGate Grafana dashboard
      • Kafka by Topic Grafana dashboard
      • EventStreams
  • New instrument doesn't have any schema validation errors
  • Prioritization agreement between analyst & PM of the QA work in the context of other needs/requests (e.g. PM may need to wait longer for some analysis so that the analyst can do the QA work)
  • Documentation of old and new table names and date of deployment for analyst's reference:
InstrumentTable nameStream deployed (if applicable)
DesktopWebUIActionsTrackingDesktopWebUIActionsTracking2023-12-05
MediaWikiWebUIActionsmediawiki_web_ui_actions2024-01-08

Data QA checklist

If more than one instrument is being migrated, these steps need to be completed for each one.

    • Count the daily number of schema validation errors for
      • Old instrument
      • New instrument
  • Compare counts of events by action and sub-action (as defined in the mapping from prerequisites)
      • if relevant Compare counts by specific identifier (as defined in the prerequisites)
    • Upload QA notebooks to Gitlab, making sure to follow data publication guidelines
    • Document any issues (or notable observations found) on this ticket
    • Resolve this ticket

NOTE: If any issues were identified that require fixing the new instrument, data QA of the fixed instrument will need to be filed as a new Phab task. Some of the checked prerequisites will carry over.


See Metrics Platform Instrument Migration Data QA Process Description for more details.

Deliveries

Details

Other Assignee
jwang

Event Timeline

jwang renamed this task from QA *webUIActions schema port to the new metrics platform to QA desktopwebuiactionstracking and mobilewebuiactionstracking schema port to the new metrics platform.Dec 11 2023, 5:25 PM
jwang triaged this task as High priority.Dec 14 2023, 7:13 PM
jwang edited projects, added Product-Analytics (Kanban); removed Product-Analytics.
KSarabia-WMF added a subscriber: jwang.

Kim will update this based on new procedure. Done

Jdlrobson set the point value for this task to 1.

Specific QA Needs:

  1. Compare old schema with new schema.
  2. Note any discrepancies with volume between old and new.
  3. Note any fields that are returning values not consistent with previous values.
  4. Note any blockers in data collection and querying.

Migration of desktopwebuiactionstracking schema is ready for QA.
The mobilewebuiactionstracking schema is pending for migration.

KSarabia-WMF renamed this task from QA desktopwebuiactionstracking and mobilewebuiactionstracking schema port to the new metrics platform to QA desktopwebuiactionstracking schema port to the new metrics platform.Feb 14 2024, 3:54 PM

@KSarabia-WMF, can you also provide the sample rate of the old schema DesktopWebUIActionsTracking? Thanks.

@jwang

'wgWMEDesktopWebUIActionsTracking' => [
	'default' => 0.2, // T258058
	'legacy-vector' => 0,
	'officewiki' => 0,
	'testwiki' => 1, // T256992
	'enwiki' => 0.01,
	// T309260 (some overlap with desktop-improvements group):
	'arwiki' => 0.2,
	'bnwiki' => 0.2,
	'frwiki' => 0.2,
	'hewiki' => 0.2,
	'htwiki' => 0.2,
	'jawiki' => 0.2,
	'kowiki' => 0.2,
	'viwiki' => 0.2,
	'zhwiki' => 0.2,
	// T321734:
	'azwiki' => 0.2,
	'dewiki' => 0.2,
	'eswiki' => 0.2,
	'fawiki' => 0.2,
	'hiwiki' => 0.2,
	'idwiki' => 0.2,
	'itwiki' => 0.2,
	'nlwiki' => 0.2,
	'plwiki' => 0.2,
	'ptwiki' => 0.2,
	'rowiki' => 0.2,
	'ruwiki' => 0.2,
	'thwiki' => 0.2,
	'trwiki' => 0.2,
	'ukwiki' => 0.2,
],

Source

Summary of data QA for the data collected by March 5 2024.

QAed Schemas:
Old: desktopwebuiactionstracking
New: mediawiki_web_ui_actions

What has been checkedStatusNoteSnapshot of the result from the old schemaSnapshot of the result from the new schema
Pick one session_id, compare the resultPASSCaptured same number of events.
image.png (410×736 px, 61 KB)
image.png (472×582 px, 44 KB)
Pick one pageview_id, compare the resultPASSCaptured same number of events.
image.png (378×632 px, 45 KB)
image.png (468×786 px, 57 KB)
By datePASSThe new schema captured 0.39% more events than the old schema. The new schema captured 0.34% more sessions than the old schema.
image.png (288×524 px, 34 KB)
image.png (284×510 px, 32 KB)
By actionPASSBetween March 1st and Match 5th, the new schema captured 0.18% more click events than old schema. The new schema captured 0.18% more click sessions than old schema. The new schema captured 0.58% more init events than old schema.The new schema captured 0.49% more init sessions than old schema. They are within 2.5% acceptable variance.
image.png (352×780 px, 49 KB)
image.png (334×704 px, 42 KB)
By event name4000+ types of event names in desktopwebuiactionstracking schema schema. Event names contain content info of the pages. . Some event names are in old schema but not in new schema, for example ui.sidebar-toc. Some event names are not in old schema but in new schema, for example, ns=0, most of them are from minerva skineven_name.diff_comparison
By wikiPASSNew schema captured 828 wikis, same as the old schema, in the month of Feb 2024.The highest different rate of session count is from small wikis. The events on nowiktionary is 42.3% fewer in new schema. The difference is reduced to 10% since 2024-02-26. The new schema captured 0.85% more events than the old schema in average.The new schema captured 1.44% more sessions than the old schema in average.
image.png (360×1 px, 51 KB)
By skin name❓ is it expected that the new schema captured 'minerva' skin with agent.client_platform_family='desktop_browser'.Based on the data collected from 20240301 to 20240305. The new schema captured 0.52% more vector events than old schema.The new schema captured 0.50% more vector sessions than old schema. The new schema captured 0.3% more vector2022 events than old schema.The new schema captured 0.25% more vector2022 sessions than old schema. minerva skin is not captured in old schema, but captured in new schema with agent.client_platform_family='desktop_browser'. To check with engineer whehter it is expected.
image.png (222×728 px, 31 KB)
image.png (326×672 px, 38 KB)
By user typePASSBased on the data collected from 20240301 to 20240305. New scheam captured more sessions and events than the old schema, but within 2.5% variance.
image.png (240×874 px, 37 KB)
image.png (240×658 px, 30 KB)
agent typePASS{F42562439}{F42562448}
edit count bucket❓ Is it expected that for logged-out users performer.edit_count_bucket is NULL in new schema, while in old schema, event.editCountBucket is '0 edits'.For logged-in users, editcountbucket difference is within 2.5% variance. For logged-out users, performer.edit_count_bucket is NULL in new schema, while in old schema, event.editCountBucket is '0 edits'. Need to confirm whether it is expected.
image.png (398×770 px, 59 KB)
image.png (460×942 px, 75 KB)
pageNamespacepage.namespace_id is NULL in new schema
image.png (332×800 px, 40 KB)
image.png (170×800 px, 24 KB)
viewportSizeBucketdiff is within 2.5% variance. new schema captured 2620 NULL viewportsizebucket with skin minerva . To check with engineer
image.png (454×806 px, 70 KB)
image.png (514×910 px, 78 KB)
is_dark_mode_on,❓ Is null in old schema expectedThe diff is within 2.5% variance. old schema captured some NULLs, while new schema did not. To check with engineer
image.png (328×968 px, 41 KB)
image.png (226×994 px, 37 KB)
is_dark_mode_prepared_by_os❓ Is null in old schema expectedThe diff is within 2.5% variance. old schema captured some NULLs, while new schema did not. To check with engineer
image.png (310×994 px, 40 KB)
image.png (240×990 px, 37 KB)
dark_mode_setting❓ Is null in old schema expectedThe differences in dark_mode_setting being 0, 2, and NULL are within a 2.5% variance. The difference in dark_mode_setting being 1 is larger than 2.5%. Due to the low volume and small absolute difference, we mark it as a pass.
image.png (330×818 px, 39 KB)
image.png (356×856 px, 41 KB)
is_full_widthThe diff is within a 2.5% variance. The old schema captured some NULLs, while new schema did not.The NULL is from anonymous users. To check with engineer
image.png (328×1 px, 72 KB)
is_media_viewer_enabledPASSThe difference is within a 2.5% variance
image.png (284×1 px, 70 KB)
is_page_preview_onPASSThe difference is within a 2.5% variance
image.png (320×1 px, 70 KB)
is_pinnedPASSThe difference is within a 2.5% variance
image.png (298×1 px, 69 KB)
fontThe diff in font=0,1,2 is within a 2.5% variance.. Some values, like large, null, regular and small, are captured in old schema only. To check with engineer.
image.png (610×1 px, 115 KB)
action_context,❓ is it expectedvalue is desktop for minerva skin in new schema
image.png (350×802 px, 36 KB)
is_botperformer.is_bot is NULL in new schema{F42603014}{F42603033}
sample rateincorrect in new schema
image.png (142×444 px, 14 KB)

@KSarabia-WMF , thanks for the info.

The QA summary is posted above (T353029#9622128)
I also documented it in the tab of desktopwebuiactionstracking in the google sheet.

Based on the number of events captured in the old and new schema, we believe the new schema is configured with the same sample rate as the old schema, as mentioned in T353029#9621127. However, it is recorded as 100% for all wikis in the new schema.

image.png (142×444 px, 14 KB)

SELECT distinct sample
FROM event.mediawiki_web_ui_actions
WHERE year=2024 AND month=3 AND day=8
AND agent.client_platform_family='desktop_browser'

@jwang

'wgWMEDesktopWebUIActionsTracking' => [
	'default' => 0.2, // T258058
	'legacy-vector' => 0,
	'officewiki' => 0,
	'testwiki' => 1, // T256992
	'enwiki' => 0.01,
	// T309260 (some overlap with desktop-improvements group):
	'arwiki' => 0.2,
	'bnwiki' => 0.2,
	'frwiki' => 0.2,
	'hewiki' => 0.2,
	'htwiki' => 0.2,
	'jawiki' => 0.2,
	'kowiki' => 0.2,
	'viwiki' => 0.2,
	'zhwiki' => 0.2,
	// T321734:
	'azwiki' => 0.2,
	'dewiki' => 0.2,
	'eswiki' => 0.2,
	'fawiki' => 0.2,
	'hiwiki' => 0.2,
	'idwiki' => 0.2,
	'itwiki' => 0.2,
	'nlwiki' => 0.2,
	'plwiki' => 0.2,
	'ptwiki' => 0.2,
	'rowiki' => 0.2,
	'ruwiki' => 0.2,
	'thwiki' => 0.2,
	'trwiki' => 0.2,
	'ukwiki' => 0.2,
],

Source

Jdlrobson updated Other Assignee, added: jwang.

Change 1013234 had a related patch set uploaded (by Phuedx; author: Phuedx):

[operations/mediawiki-config@master] Update mediawiki.web_ui_actions stream config

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

❓ is it expected that the new schema captured 'minerva' skin with agent.client_platform_family='desktop_browser'.

Yes. It's possible to use the Minerva skin in a "desktop" environment so I would expect there to be some events like this.

❓ Is it expected that for logged-out users performer.edit_count_bucket is NULL in new schema, while in old schema, event.editCountBucket is '0 edits'.

Yes. This is a discrepancy between the way Web's instrument captures this data and how the Metrics Platform captures the data. See also T329292: Determine what UserBucketService::getUserEditCountBucket should return for anons.

pageNamespace ❌

This is a bug in the JS Metrics Platform client library! See T360609: [JS] Metrics Platform client library doesn't capture page.namespace_id

viewportSizeBucket❓ new schema captured 2620 NULL viewportsizebucket with skin minerva
action_context❓is it expected? value is desktop for minerva skin in new schema

This is a discrepancy between the desktop- and mobile- versions of the instrument. The mobile version of the instrument captures "mobile modes" in the action_context field. If it's not useful any more, then I would recommend against capturing it as it would make merging the two versions of the instrument easier /cc @ovasileva

is_bot ❌ performer.is_bot is NULL in new schema

This is due to a misconfiguration. See https://gerrit.wikimedia.org/r/c/operations/mediawiki-config/+/1013234.

@phuedx Is there anything we can do from the web team side on this?

@phuedx Is there anything we can do from the web team side on this?

At the risk of increasing the scope of the migration, you could consider merging the separate Desktop- and MobileWebUIActionsTracking instruments. The discrepancies between what those two instruments log appear here, i.e.

  1. DesktopWebUIActionsTracking ("Desktop") includes the bucketized viewport size but MobileWebUIActionsTracking ("Mobile") doesn't
  2. Desktop uses onClickTrack() (source) but Mobile doesn't
  3. Mobile tracks "mobile modes" (IIRC whether AMC is enabled) but Desktop doesn't
  4. Mobile submits events like action=init,action_source="ns=0" (source) but Desktop submits events like action=init

is_bot ❌ performer.is_bot is NULL in new schema

This is due to a misconfiguration. See https://gerrit.wikimedia.org/r/c/operations/mediawiki-config/+/1013234.

I've scheduled that patch for deployment on Monday: https://wikitech.wikimedia.org/w/index.php?title=Deployments&diff=2161767&oldid=2161572

We are going to close this because the main goal here has been accomplished.
The ticket to address discrepancies has been written by @SToyofuku-WMF here: T360811
I wrote another Phab ticket that will track the previous comment by @phuedx here: T360955

As a followup, I have documented the sample rate at datahub. @KSarabia-WMF , please review and confirm whether they are reflecting the current configuration.