Page MenuHomePhabricator

Provide data for usage metrics
Closed, ResolvedPublic5 Estimated Story Points

Description

Please measure with at least a one-day granularity

Access step:

Preview step:

  • how often the import fails because of any exception, seperated by the reasons, e.g. - https://gerrit.wikimedia.org/r/#/c/414677/
    • a suppressed file (do we coun't each file once, of if there are multiple attempts, we count it multiple times?)
    • missing info (e.g. first version of file could not be retrieved anymore)
    • any of our max revisions limit is hit

Import Step:

  • how many files were successfully moved
  • how long it takes between users clicking the "import button" and redirecting to the commons page of a successful transfer
  • the number of file revisions, number of text revisions, and total MB moved for files that were attempted to be moved

Misc:

  • add all new metrics variable to a metrics.md file in the docs folder of the respective extension - Done in all patches

Related Objects

Event Timeline

Lea_WMDE created this task.
 how often the import fails because of any exception, seperated by the reasons, e.g.
a suppressed file (do we coun't each file once, of if there are multiple attempts, we count it multiple times?)
missing info (e.g. first version of file could not be retrieved anymore)
any of our max revisions limit is hit
a failure of the abuse filter

So all of these things are actually checked before the preview page is shown, rather than at time of import.
I guess we want to track that?
However it should be noted the number of failed imports and the number of times these things occur do not relate at all.

Change 413195 had a related patch set uploaded (by Addshore; owner: Addshore):
[mediawiki/extensions/FileImporter@master] Provide import step data for usage metrics

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

Change 413199 had a related patch set uploaded (by Addshore; owner: Addshore):
[mediawiki/extensions/FileExporter@master] Add another URL parameter to ease detection of imports from exporter

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

Change 413203 had a related patch set uploaded (by Addshore; owner: Addshore):
[mediawiki/extensions/FileImporter@master] Provide special page load data for usage metrics

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

Patches above cover the access and import step.
TODO still is the preview step.

Change 413195 merged by jenkins-bot:
[mediawiki/extensions/FileImporter@master] Provide import step data for usage metrics

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

Some questions that bumped into my head while reviewing patches here:

The SpecialPage on the Importer only shows if the user accessing it has rights to upload a file. ( I think on commons this means he as to have an account and needs to be logged in ). If a user gets to the Importer special page by clicking a link on the Exporter and - for whatever reason - he is not logged in, he will get a message, that he should login to continue.

Q1: Do we want to log theses special events? ( if the user needs to be logged in on the source wiki like en.wp SUL should normally take care of him being logged in on commons as well I guess, but still )
Q2: Sister projects like mediawiki.org / wikivoyage.org do not share the SUL login state with commons so...

  • a) Do we want to allow moving files from there too?
  • b) Would that work?

@Addshore @Lea_WMDE

Change 413203 merged by WMDE-Fisch:
[mediawiki/extensions/FileImporter@master] Provide special page load data for usage metrics

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

Q1)Can this really happen? We only show the "move to commons" link to autoconfirmed users, right?
Q2) Let me take this into my next UX meeting (FYI @Charlie_WMDE @Hanna_Petruschat_WMDE) and we will get back about that probably during storytime.
Thanks for the info @WMDE-Fisch!

Q1)Can this really happen? We only show the "move to commons" link to autoconfirmed users, right?

Yes, the link is only visible for autoconfirmed users. No I think normally this should not happen. But when clicking the link, the user will be redirected to the commons wiki on another domain. There he should be automatically and instantly logged in due to SUL cookie magic and therefore he should be able to see the special page and upload images.

But: We don't really know in how many cases this process of getting automatically logged in to a foreign wiki with SUL breaks. So I thought we might want to try to track that somehow. - Could be disturbing for the users and if it happens often me might want to react to that in some graceful way. ;-)

Q1)Can this really happen? We only show the "move to commons" link to autoconfirmed users, right?

Permissions on commons and permissions on client projects are different things.
An auto confirmed user on enwiki may not be autoconfirmed on commons.

Yes we do check that the link is only shown to auto confirmed users.

An auto confirmed user on enwiki may not be autoconfirmed on commons.

But you don't have to be autoconfirmed on commons to use our special page there, right?b

But: We don't really know in how many cases this process of getting automatically logged in to a foreign wiki with SUL breaks. So I thought we might want to try to track that somehow. - Could be disturbing for the users and if it happens often me might want to react to that in some graceful way. ;-)

Then let's track this and see :)

An auto confirmed user on enwiki may not be autoconfirmed on commons.

But you don't have to be autoconfirmed on commons to use our special page there, right?b

No, but you need to be able to upload / be registered :)

Change 413747 had a related patch set uploaded (by Addshore; owner: Addshore):
[mediawiki/extensions/FileImporter@master] Track number of users not allowed to access special page

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

Change 414677 had a related patch set uploaded (by Addshore; owner: Addshore):
[mediawiki/extensions/FileImporter@master] Track how often ImportPlan creation fails

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

Addshore moved this task from Doing to Review on the WMDE-QWERTY-Sprint-2018-02-20 board.
Addshore moved this task from Back Burner 🏛️ to Active 🚁 on the User-Addshore board.

Change 413747 merged by jenkins-bot:
[mediawiki/extensions/FileImporter@master] Track number of users not allowed to access special page

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

Change 414677 merged by jenkins-bot:
[mediawiki/extensions/FileImporter@master] Track how often ImportPlan creation fails

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

Change 413199 merged by jenkins-bot:
[mediawiki/extensions/FileExporter@master] Add another URL parameter to ease detection of imports from exporter

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

While working with WP and Commons I just realized, that the following seems to be wrong :-/ :

when clicking the link, the user will be redirected to the commons wiki on another domain. There he should be automatically and instantly logged in due to SUL cookie magic and therefore he should be able to see the special page and upload images.

  • when I am logged in on Wikipedia
  • and I am not yet logged in on Commons
  • and I go to https://commons.wikimedia.org/wiki/Special:UploadWizard ( a page that can only be used by logged-in users like our import special page )
  • then I get the message Please log in to upload files.

Usually some JS logic will take care so that I will be logged in an instant but that happens after the PHP is delivered. So users in our use case will probably always run into the "cannot upload" page when not already logged in on commons as well.