Motivation
There's more context for why we want to do this in T273021: Collect metrics for IP usage and an investigation on how we could do this in T273091: Investigate: Measure how often IP addresses are copied [8H].
What we want to capture
- Capture how often an IP address is copied on one of the page-types below
- Capture the page type on which the copy action happened (this will give us a sense of which pages are more important in this workflow for editors to scrutinize IP edits, T263637)
- History pages (action=history)
- Special:RecentChanges
- Special:Log
- Special:Investigate
- Special:Contributions
What we don't want to capture
- IP addresses being copied
- User identification of the user doing the copy action
How we want to log this
We will use statsd/Graphite for this. Helpful links:
- https://wikitech.wikimedia.org/wiki/Graphite#Data_sources
- https://gerrit.wikimedia.org/r/c/mediawiki/extensions/MobileFrontend/+/626710/7/src/mobile.editor.overlay/blockMessageDrawer.js
QA prerequisites
- The EventLogging and WikimediaEvents extensions are installed
- The following lines are in your LocalSettings.php:
$wgWMEStatsdBaseUri = '/beacon/statsv'; $wgWMEIPAddressCopyActionEnabled = true;
QA steps
- Log out
- Make an edit to a page
- View the history of that page (click the "View history" tab)
- Copy the IP address of the most recent edit
- Observe that an HTTP request has been made to /beacon/statsv?MediaWiki.ipinfo_address_copy.action_history=1c after a brief delay
- Visit Special:RecentChanges
- Copy the IP address of the most recent edit
- Observe that an HTTP request has been made to /beacon/statsv?MediaWiki.ipinfo_address_copy.special_recentchanges=1c after a brief delay
- View the contributions from that IP by visiting /wiki/Special:Contributions/...
- Copy the IP address from the content of that page
- Observe that an HTTP request has been made to /beacon/statsv?MediaWiki.ipinfo_address_copy.special_contributions=1c after a brief delay