Page MenuHomePhabricator

Migrate MediaWiki.api to statslib
Closed, ResolvedPublic

Description

Follow the migration process as outlined below.

Secure/Conduct code review(s).
Deploy the changes to production via the train (https://wikitech.wikimedia.org/wiki/Deployments/Train).
Verify that the changes have been successfully implemented.
Update the relevant dashboard(s) by replacing the old Graphite metric(s) with the new Prometheus metric(s).
Please follow the guidelines and standards outlined in the provided documentation:

https://www.mediawiki.org/wiki/Manual:Stats for detailed guidance on the conversion process.
https://drive.google.com/file/d/12yQEuOapkML1vb9MgCaX1QzbLBdXE6X2/view for a video tutorial on the conversion process.
https://docs.google.com/presentation/d/1SZWf_D3mWNX-XHN8PHYI84LDZr6GUQC2AMhZ9mQXCI0/edit#slide=id.g2795460c956_0_23 for slides on the best practices for converting metrics to statslib.

  • MediaWiki.api.*
  • MediaWiki.api.*.*.*
  • MediaWiki.api.$module.executeTiming.$metric
  • MediaWiki.api.$module.executeTiming.p*
  • MediaWiki.api.$module.executeTiming.sample_rate
  • MediaWiki.api.$module.executeTiming.sum
  • MediaWiki.api.createaccount.executeTiming.$metric
  • MediaWiki.api.createaccount.executeTiming.sample_rate
  • MediaWiki.api.cxdelete.*.count
  • MediaWiki.api.cxsave.*.rate
  • MediaWiki.api.mobileview.executeTiming.sample_rate
  • MediaWiki.api.modules.*.count
  • MediaWiki.api.modules.query
  • MediaWiki.api.modules.query.*.count
  • MediaWiki.api.pagetriagelist.executeTiming.mean
  • MediaWiki.api.pagetriagestats.executeTiming.mean
  • MediaWiki.api.pagetriagetagging.executeTiming.mean
  • MediaWiki.api_query.*.executeTiming.median
  • MediaWiki.api_query.*.executeTiming.sample_rate
  • MediaWiki.api.wb
  • MediaWiki.api.wbeditentity.executeTiming.median
  • MediaWiki.api.wb*.executeTiming.count
  • MediaWiki.api.wb*.executeTiming.sample_rate
  • MediaWiki.api.wb*.executeTiming.sum
  • MediaWiki.api.wbgetentities.executeTiming.median

Event Timeline

This task covers client-side code for a variety of APIs owned by different teams. Perhaps it would make sense to split it into separate tasks, each covering the client side code for functionality owned by a given team.

This task covers client-side code for a variety of APIs owned by different teams. Perhaps it would make sense to split it into separate tasks, each covering the client side code for functionality owned by a given team.

I agree, and that makes sense. I would greatly appreciate it if folks could kindly break down the subtasks for any metrics they support under this list, as I currently lack sufficient context around MW code/service ownership to do so.

colewhite claimed this task.
colewhite subscribed.

These metrics were migrated as part of https://gerrit.wikimedia.org/r/c/mediawiki/core/+/990176

These metrics were migrated as part of https://gerrit.wikimedia.org/r/c/mediawiki/core/+/990176

That takes care of all the keys that contain .executeTiming. and .extraDataTiming..

From the way the keys are grouped in the task description, I assumed that some API modules emit additional metrics... was I wrong about that? Or do they do this using a different prefix? I just saw that the ContentTranslation extension's API modules record a metric under MediaWiki.cx., rather than MediaWiki.api.cx... Is that the case for all extensions?

From the way the keys are grouped in the task description, I assumed that some API modules emit additional metrics... was I wrong about that? Or do they do this using a different prefix? I just saw that the ContentTranslation extension's API modules record a metric under MediaWiki.cx., rather than MediaWiki.api.cx... Is that the case for all extensions?

Most extensions I've seen so far follow the pattern you describe.

I can't say for sure if it's 100% consistent across all extensions, but I have yet to find evidence of api prefix usage outside of core.

From the way the keys are grouped in the task description, I assumed that some API modules emit additional metrics... was I wrong about that? Or do they do this using a different prefix? I just saw that the ContentTranslation extension's API modules record a metric under MediaWiki.cx., rather than MediaWiki.api.cx... Is that the case for all extensions?

Most extensions I've seen so far follow the pattern you describe.

I can't say for sure if it's 100% consistent across all extensions, but I have yet to find evidence of api prefix usage outside of core.

So much the better. I got my initial assessment wrong then. Apologies.