Page MenuHomePhabricator

Add instrumentation to Special:EditGrowthConfig
Open, MediumPublic

Description

The Growth team created community configuration that empowers communities to customize certain aspects of Growth features. It looks that only a couple of communities actually use that option though. It'd be useful to know how the special page is used. To be able to learn more and monitor how community configuration is used, let's instrument it. We want to instrument page loads and saves of configuration.

Logged events should have at least the following fields:

  • action: enum, set to either view or save, depending on the action user preformed
  • privileged_user: boolean that's true if the user is able to use the form
  • performer: who caused the event (only populated for saves, to protect user privacy)
Acceptance criteria
  • Special:EditGrowthConfig logs events in EventLogging as described in the task

Event Timeline

Change 811357 had a related patch set uploaded (by Urbanecm; author: Urbanecm):

[schemas/event/secondary@master] Add analytics/mediawiki/editgrowthconfig

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

Change 811358 had a related patch set uploaded (by Urbanecm; author: Urbanecm):

[mediawiki/extensions/GrowthExperiments@master] Add basic instrumentation to SpecialEditGrowthConfig

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

Urbanecm_WMF moved this task from Incoming to Code Review on the Growth-Team (Current Sprint) board.
Urbanecm_WMF moved this task from Backlog to In review on the User-Urbanecm_WMF (Engineering) board.

Change 811357 merged by jenkins-bot:

[schemas/event/secondary@master] Add analytics/mediawiki/editgrowthconfig

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

Change 811358 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] Add basic instrumentation to SpecialEditGrowthConfig

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

Change 811910 had a related patch set uploaded (by Urbanecm; author: Urbanecm):

[operations/mediawiki-config@master] Declare mediawiki.editgrowthconfig schema

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

Change 811910 merged by jenkins-bot:

[operations/mediawiki-config@master] Declare mediawiki.editgrowthconfig schema

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

Mentioned in SAL (#wikimedia-operations) [2022-07-07T09:43:46Z] <urbanecm@deploy1002> Synchronized wmf-config/InitialiseSettings.php: 8599f395bd3af2b27aa06cdc318d44e97efc8119: Declare mediawiki.editgrowthconfig schema (T312148) (duration: 03m 37s)

I can't get any data in https://stream-beta.wmflabs.org/v2/ui/#/ when using the special:editgrowthconfig page. i'll investigate.

Change 820227 had a related patch set uploaded (by Urbanecm; author: Urbanecm):

[schemas/event/secondary@master] analytics/mediawiki/editgrowthconfig: Ref analytics/common

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

Change 820228 had a related patch set uploaded (by Urbanecm; author: Urbanecm):

[mediawiki/extensions/GrowthExperiments@master] SpecialEditGrowthConfigLogger: Update schema version

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

Change 820227 merged by jenkins-bot:

[schemas/event/secondary@master] analytics/mediawiki/editgrowthconfig: Ref analytics/common

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

Change 820228 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] SpecialEditGrowthConfigLogger: Update schema version

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

Change 820276 had a related patch set uploaded (by Urbanecm; author: Urbanecm):

[mediawiki/extensions/GrowthExperiments@wmf/1.39.0-wmf.23] SpecialEditGrowthConfigLogger: Update schema version

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

I can't get any data in https://stream-beta.wmflabs.org/v2/ui/#/ when using the special:editgrowthconfig page. i'll investigate.

After T314173: editgrowthconfig schema: '' should NOT have additional properties, got fixed, it works! I'll push it to wmf.23 too and verify at testwiki.

Change 820276 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@wmf/1.39.0-wmf.23] SpecialEditGrowthConfigLogger: Update schema version

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

I can't get any data in https://stream-beta.wmflabs.org/v2/ui/#/ when using the special:editgrowthconfig page. i'll investigate.

After T314173: editgrowthconfig schema: '' should NOT have additional properties, got fixed, it works! I'll push it to wmf.23 too and verify at testwiki.

Seems to work!

Mentioned in SAL (#wikimedia-operations) [2022-08-04T09:38:50Z] <urbanecm@deploy1002> Synchronized php-1.39.0-wmf.23/extensions/GrowthExperiments/includes/EventLogging/SpecialEditGrowthConfigLogger.php: ba67dd940217e9f786f4349b4da0fe088475fde9: SpecialEditGrowthConfigLogger: Update schema version (T314173, T312148) (duration: 03m 18s)

I checked the data, and I forgot to account for spiders that go to Special:EditGrowthConfig as well. While we can do something like this:

ADD JAR hdfs://analytics-hadoop/wmf/refinery/current/artifacts/org/wikimedia/analytics/refinery/refinery-hive-0.1.2.jar;
CREATE TEMPORARY FUNCTION is_spider as 'org.wikimedia.analytics.refinery.hive.IsSpiderUDF';
SELECT * FROM event.mediawiki_editgrowthconfig WHERE year=2022 AND is_spider(http.request_headers['user-agent']) = false LIMIT 10;

it's still possible many spiders will fall through (as they do in pageviews), and the data will be inaccurate. Let's add is_registered_user to the schema as well, that should make the data more reliable (and we're also more interested in community-initiated views anyway).

Change 820661 had a related patch set uploaded (by Urbanecm; author: Urbanecm):

[schemas/event/secondary@master] analytics/mediawiki/editgrowthconfig: Add is_registered_user

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

Change 820662 had a related patch set uploaded (by Urbanecm; author: Urbanecm):

[mediawiki/extensions/GrowthExperiments@master] SpecialEditGrowthConfigLogger: Add is_registered_user

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

Urbanecm_WMF changed the task status from Open to In Progress.Thu, Aug 11, 11:08 AM

Change 820661 merged by jenkins-bot:

[schemas/event/secondary@master] analytics/mediawiki/editgrowthconfig: Add is_registered_user

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

Urbanecm_WMF changed the task status from In Progress to Open.Tue, Aug 16, 6:05 AM

Change 820662 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] SpecialEditGrowthConfigLogger: Add is_registered_user

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