Dear Search Platform team,
Here is Anton, the PM of Wikibase Cloud. @Lydia_Pintscher encouraged me to open a ticket here to request some informational support about one of our upcoming initiatives.
Our goal is to establish metrics that would measure in any given Query Service instance (including Wikidata):
- the number of queries that were executed there (potentially, with status - success/fail/...not sure if there are any other options)
- the number of federated queries that started on this instance (those that call out to a remote SPARQL end point)
- the number of federated queries received by this instance (those that started somewhere else and ended up in this Query Service)
- potentially some other more detailed metrics that measure federation to other Wikibases, to non-Wikibase instances, specifically to Wikidata, etc.
We want to be able to implement tracking that could work with a Query Service running alongside any Wikibase instance - whether it is Wikidata, self-hosted or hosted on Wikibase Cloud (of course, it might need to be adapted to the specifics of the product, but the general core logic should be shared).
We have little experience with the Query Service backend, and would like to get an initial understanding of some things:
- Does some kind of similar logging/tracking already exist in Query Service? What information does it contain?
- Based on your impression, how feasible to you think such initiative is (especially for a team that is not yet familiar with the code base)? Do you immediately see some potential pitfalls?
- Can Query Service backend recognize when a query it is supposed to execute started on its own UI vs. it is a federated query that started on some other SPARQL endpoint?
- Is there a sure way to differentiate between situations when SERVICE is used to call an external endpoint (what we would consider a federated query) vs. used to call some helpers like label service or similar? Would it have to rely on some fixed list of exceptions? Or is there a more elegant way to do this?
Thank you so much for your help and let me know if Phabricator is not the best medium for this conversation
Anton