As a Wikidata Product Manager I want to know how Wikibase REST API is used on Wikidata so I can reason on its adoption and usage trends.
WMDE's Wikidata Team has had a number of dashboards where they monitor the usage of APIs (action API currently) on Wikidata. They intend to also be able to include there reads and edits done using Wikibase REST API.
According to @Addshore's elaboration in April 2022 (via email, summarized below) the following dashboard are likely to be involved.
https://grafana.wikimedia.org/d/MR93RkVWk/wikibase-api
https://grafana.wikimedia.org/d/79S1Hq9Mz/wikidata-reliability-metrics
https://grafana.wikimedia.org/d/000000265/wikibase-api-wbgetentities
The relevant graphs on those dashboards seem to rely on data provided to the following WMF Graphite metrics
- api.xyz.executeTiming (not Wikibase specific, provided by Mediawiki framework)
- wikibase.repo.api.getentities.entities (code) -- not relevant for Wikibase REST API currently, as there is no possibility to request data of specified number of items other than 1.
Based on the cursory search Mediawiki REST API currently does not record timing/usage of REST API on the framework level.
It likely means to in order to fulfill requirements of Wikidata Wkibase REST API would either need to allow optional metric tracking in scope of the REST API, or add such an option on the Mediawiki REST API framework level. The latter is likely to happen with the coordination with a currently unnamed WMF counterpart team.
Scope constraints:
- Any adjusting of existing dashboards etc is not a task for the Wikibase Product Platform team and would be tracked separately
- Enabling Wikidata team to collect usage metrics in their preferred system must be implemented in a way that does not require other Wikibase installation to have data/metric collection set up the same as WMF/Wikidata has
- WMDE Wikidata team likely has requirements to logging REST API requests the way it seems to be done for Action API via Mediawiki framework. There seem to be no similar mechanism for Mediawiki REST API at this point. This will be tracked as a separate effort.
- @Addshore hinted at WMDE's Wikidata metric also collecting data based on the request path hinting at API usage. Whether the data is stored already via Mediawiki REST API framework is to be confirmed as a follow up task. Adjusting the linked script is outside of responsibilities of Wikibase Product Platform team.