Page MenuHomePhabricator

[Task] Track usage of the index feature in SetClaim API
Closed, ResolvedPublic

Description

Track how often the index feature is used. The critical line of code is in ChangeOpStatement. The only caller is the SetClaim API module. Track two numbers: Total calls of SetClaim and how often a non-null index is provided.

Details

Related Gerrit Patches:
mediawiki/extensions/Wikibase : masterTrack usage of index feature in wbsetclaim API

Related Objects

StatusAssignedTask
Declineddchen
OpenNone
OpenNone
DuplicateNone
OpenNone
ResolvedAbit
OpenNone
DuplicateNone
OpenNone
OpenNone
OpenNone
DuplicateNone
InvalidLydia_Pintscher
OpenNone
OpenNone
StalledNone
OpenNone
ResolvedAddshore
Resolvedthiemowmde
ResolvedAddshore
Resolvedthiemowmde
Resolvedthiemowmde
Resolvedthiemowmde
Resolvedthiemowmde
Resolvedthiemowmde

Event Timeline

Restricted Application added subscribers: Zppix, Aklapper. · View Herald TranscriptMay 10 2016, 1:57 PM
Restricted Application added a subscriber: TerraCodes. · View Herald TranscriptMay 11 2016, 12:54 PM

Change 288186 had a related patch set uploaded (by Addshore):
Track usage of index feature in wbsetclaim API

https://gerrit.wikimedia.org/r/288186

+2ed the change.
Data will start being recorded once the code is next deployed.
Feel free to give me a poke after that to create a dashboard if you wish! :)

Addshore moved this task from incoming to ready to go on the Wikidata board.May 11 2016, 2:07 PM

Change 288186 merged by jenkins-bot:
Track usage of index feature in wbsetclaim API

https://gerrit.wikimedia.org/r/288186

What is still missing here? Only the dashboard? @thiemowmde @Addshore

I believe so! :)

@Addshore, will you add a board to https://grafana.wikimedia.org/dashboard/db/wikidata? I don't know how to do it. The two names I used are wikibase.repo.api.wbsetclaim.total and wikibase.repo.api.wbsetclaim.index. A single graph with both numbers is sufficient. I believe a percentage graph is pretty pointless, but if it's "free" to add one please do so.

Yep, I will be able to do it once the data starts coming in (so after the next WD deployment).
If you would like I can sit down with you next week and do it (I'll be in the office).
Have you signed an NDA for the WMF before?

I created https://grafana.wikimedia.org/dashboard/db/wikidata-api-wbsetclaim but got stuck.

  • I tried to use sum and count on the wikibase.repo.api.wbsetclaim.total and wikibase.repo.api.wbsetclaim.index keys I added to SetClaim.php, and get totally different numbers I both don't understand. Which number is the actual number of calls? And what is the other number then?
  • It looks like wikibase.repo.api.wbsetclaim.index is either not called at all or not tracked for a reason I do not understand.
  • Whatever I do, Grafana refuses to show a flat line in the graph for the non-existing index key. How do I enforce this? Other graphs have a flat line, but I can not reproduce this.
  • How is daily data generated? That's what I actually want, not the current graphs.

I created https://grafana.wikimedia.org/dashboard/db/wikidata-api-wbsetclaim but got stuck.

  • I tried to use sum and count on the wikibase.repo.api.wbsetclaim.total and wikibase.repo.api.wbsetclaim.index keys I added to SetClaim.php, and get totally different numbers I both don't understand. Which number is the actual number of calls? And what is the other number then?

So each of these could be aggregated in different ways.
See https://github.com/wikimedia/operations-puppet/blob/01d26c2c16e9cbab7c6de1625b705d4ab7ec7c33/modules/role/manifests/graphite/base.pp#L56 which shows how they are aggregated and https://github.com/wikimedia/operations-puppet/blob/01d26c2c16e9cbab7c6de1625b705d4ab7ec7c33/modules/role/manifests/graphite/base.pp#L49 for the retention lengths.

count is the number count of the metrics sent to statsd in the flush period (which is 60 seconds).
sum is the sum of the metrics that were sent to statsd

It should be noted that the sum value recorded here basically matches the signiture of the graph shown on https://grafana-admin.wikimedia.org/dashboard/db/wikidata-edits in the 'Edit type' section.

  • It looks like wikibase.repo.api.wbsetclaim.index is either not called at all or not tracked for a reason I do not understand.

Indeed, it looks like that is not called at all!
I also totally believe this, I myself have never used it.

  • Whatever I do, Grafana refuses to show a flat line in the graph for the non-existing index key. How do I enforce this? Other graphs have a flat line, but I can not reproduce this.

AFAIK you can make it produce a flat line in the case where a value is NULL (ie has not been submitted to graphite).
However the case with index is that a value has never been submitted thus the metric file doesn't exist.
Instead of seeing this as nulls or 0s grafana sees this as an error, as the metric doesn't exist.

  • How is daily data generated? That's what I actually want, not the current graphs.

If you mean the data under the daily.* prefix that is generally generated using external scripts.
http://github.com/wikimedia/analytics-wmde-scripts
It has also just been puppetized T125989
The daily.* metrics are retained and thus aggregated in a different way https://github.com/wikimedia/operations-puppet/blob/01d26c2c16e9cbab7c6de1625b705d4ab7ec7c33/modules/role/manifests/graphite/base.pp#L42
You should be able to change the graph to show you daily data by using something like

summarize(1d, sum, false)
Addshore moved this task from Unsorted 💣 to Watching 👀 on the User-Addshore board.

Thanks a lot! I gave up waiting and did an edit myself. Now the "index" line is shown. I reworked the board and used the summarize feature. The only think I could not figure out is how to remove the "02:00:00" time display from the graph. But this is pretty much irrelevant. I'm very happy with the rest now.

thiemowmde closed this task as Resolved.Jul 20 2016, 11:52 AM
thiemowmde claimed this task.
thiemowmde moved this task from ready to go to in progress on the Wikidata board.