Page MenuHomePhabricator

Add tracking instrumentation to Edit Recovery
Closed, ResolvedPublic

Description

It might be useful during deployment to track overall usage of the Edit Recovery feature — something simple like a statsv metric?

We could log:

  • When the Edit Recovery model is displayed ( e.g. MediaWiki.edit_recovery.show.by_wiki.{wiki}.count )
  • When a user discards the restored edit content ( e.g. MediaWiki.edit_recovery.discard.by_wiki.{wiki}.count )

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
TheresNoTime renamed this task from Should we add tracking instrumentation to Edit Recovery? to Add tracking instrumentation to Edit Recovery.Feb 20 2024, 11:31 AM

Change 1005057 had a related patch set uploaded (by Samtar; author: Samtar):

[mediawiki/core@master] [WIP] Add statsv to edit recovery

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

Change 1005057 merged by jenkins-bot:

[mediawiki/core@master] Add statsv to edit recovery

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

Ready for QA — unfortunately I only know how to check these are working using graphite (which has been shut down on the beta cluster, so I believe you need to use https://prometheus.wmcloud.org ?).

The metric names will be MediaWiki.edit_recovery.${ metric }.by_wiki.${ dbName }, where ${ metric } is either show (fired when the "Changes recovered" popup is displayed) or discard (fired when the "Discard" button of the popup is clicked).

dom_walden subscribed.

Testing this on beta and inspecting the network tab, I see

I believe this is correct.

I don't know how to use https://prometheus.wmcloud.org, so I couldn't check if the data appears there.