Lucas_Werkmeister_WMDE created this task. Lucas_Werkmeister_WMDE added projects: Wikidata, Wikibase-Quality, Wikibase-Quality-Constraints. Herald added a subscriber: Aklapper. |
The WikibaseQualityConstraints extension offers a wbcheckconstraints action in the MediaWiki action API, but the main user of that action is the extension itself: when a logged-in user visits a Wikibase entity page, we inject a ResourceLoader module which performs a request against that API and injects the results into the page, showing which statements of the entity violate quality constraints.
We would like to know how many other users this API action has, so that we can plan how careful we need to be about making breaking changes to it – right now we adhere to the Wikidata Stable Interface Policy, but we’re not aware of any external users of the API that would actually be affected by the breaking changes.
To this end, we added a header X-MediaWiki-Gadget to the API requests performed by our ResourceLoader module (T180780), so that we could compare the number of requests with that header (our own code) and without it (external users). We were under the impression that this header would be recorded for later use in analytics, but it turns out that only the special X-Analytics header is recorded, so the X-MediaWiki-Gadget header is useless right now.
Possible options:
- Ditch X-MediaWiki-Gadget and use X-Analytics instead. I’m not sure how this would work… is X-Analytics even used for requests coming from clients, or only for responses going from the application server to the caching layer?
- Keep X-MediaWiki-Gadget and parse it inside the wbcheckconstraints API, incrementing statsd counters depending on the presence or absence of the header. This is a fairly simple solution, but also fairly custom? But the situation isn’t exactly common either (the normal case would be to just include the constraint reports in the page we send initially, without an API request), so perhaps that’s okay.
- Other options?
Cc: Lucas_Werkmeister_WMDE, Aklapper, Lahi, Gq86, GoranSMilovanovic, QZanden, LawExplorer, Agabi10, Wikidata-bugs, aude, Mbch331
_______________________________________________ Wikidata-bugs mailing list Wikidata-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs