We would like to send a user agent with federated API requests that includes the local Wikibase URI. The reasons for this are twofold:
# From a technical standpoint, even if we don't gather metrics from these user agentsFor the federated properties MVP, we will still wantould like to send them with thea user agent with federationed API requests by default (e.gthat includes the local Wikibase URI. These should be sent with the federation requests by default so that traffic can be filtered if necessary)
# We want to know how many Wikibases have opted in to reusing Wikidata's properties so that we can monitor the demands this might put on WD infrastructure in the future.
Configuration documentation T246128 should be updated to mention what information is sent via the user agent [only the Wikibase URI] and why this is sent [filtering traffic/preventing abuse].
**Open Questions****Note**
Confirm what level of usage tracking is likely to be accepted by the community prior to implementingEventually, we will also want to know how many Wikibases have opted in to reusing Wikidata's properties so that we can monitor the demands this might put on WD infrastructure in the future. This level of tracking may require a discussion with the community if done by default. We will address this in future phases of federation.
**Initial Estimation**
- For sending the user agent: 3 SPs
- For also metrics tracking (setting up grafana board using the "new" way (Reportupdater): 8 SPs
**Technical Notes**
There is a `GenericActionApiClient` that sends all outgoing requests to the source wiki. It uses MediaWiki's `HttpRequestFactory::create` to create requests, which takes an `$options` array, which may contain a `userAgent` field.