Page MenuHomePhabricator

Add prometheus metrics for Commons file uploads
Open, Needs TriagePublic

Description

Recently in T385273 and in various historic incidents related to the pre-Mercurius jobrunners and to thumbor, patterns are gradually noticed in various services impacted by media uploads. Generally discovering these patterns is quite difficult and is generally relatively manual process. Having Prometheus metrics emitted by Mediawiki that give insight into files uploaded would be of great use to SRE and others.

Some non-exhaustive suggestions for what would be good to see (entirely dependent upon what we can easily gather and feasibly compute):

  • Number of files
  • Size of files
  • Status of files if they are subject to processing (transcoding etc - thumbnailing is probably out of scope)

Labels:

  • broad type (Videos/3D/Audio/Images/etc)
  • specific type (not sure if this is possible - breakdown by mimetype or other method, jpeg vs png etc)
  • Some method of viewing distribution of uploads by user over a period (would need some kind of heuristic to be useful rather than just having user as a label. Helpful for judging surges in uploads)
  • method (if possible - UploadWizard/bulk upload, copy by URL etc)