Page MenuHomePhabricator

Minerva skin should increment MinervaClientError only once per request
Open, LowPublic

Description

To minimize the traffic sent to the stats endpoint we should track MinervaClientError counter only once after the request is done, not on every error occurrence.

Additionally tracking once per request should allow us to find out what is the average errors count per page view (is it just one error from time to tome, or is it multiple errors at the same page view)

Acceptance criteria

  • Rather than adding 1 to counter.MediaWiki.minerva.WebClientError we will use an unload event to add all errors in one go.

Developer notes

Piotr's patch does the job but was reverted so we can take time to talk through the details in grooming and Sam's comment below (T212970#4943448). It can be be reapplied and +2ed when that's happened and we've given it the OK.

Event Timeline

pmiazga created this task.Jan 4 2019, 8:22 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJan 4 2019, 8:22 PM

Change 467984 had a related patch set uploaded (by Pmiazga; owner: Pmiazga):
[mediawiki/skins/MinervaNeue@master] Hygiene: Track minerva errors count only once

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

Jdlrobson updated the task description. (Show Details)Jan 9 2019, 1:15 AM
Jdlrobson awarded a token.
Jdlrobson triaged this task as Normal priority.
Jdlrobson moved this task from Needs Analysis to Triaged but Future on the Readers-Web-Backlog board.

Change 467984 merged by jenkins-bot:
[mediawiki/skins/MinervaNeue@master] Hygiene: Track minerva errors count only once

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

phuedx added a subscriber: phuedx.Feb 11 2019, 1:40 PM

To minimize the traffic sent to the stats endpoint we should track MinervaClientError counter only once after the request is done, not on every error occurrence.

Was there any investigation done into whether traffic sent to the endpoint was problematic?

Note well that the StatsV client maintains an internal queue of metrics to send to the server, which it flushes every two seconds. However, depending on your client (a tab in a mobile UA, for example), this buffer might not get flushed consistently around page unload (see T208980: [Bug] The statsv client should send a request when the page unloads so we are not losing events and T208980#4792762 in particular).

Change 489749 had a related patch set uploaded (by Jdlrobson; owner: Jdlrobson):
[mediawiki/skins/MinervaNeue@master] Revert "Hygiene: Track minerva errors count only once"

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

Jdlrobson updated the task description. (Show Details)
Jdlrobson updated the task description. (Show Details)
Jdlrobson removed Jdlrobson as the assignee of this task.
Jdlrobson moved this task from Triaged but Future to Upcoming on the Readers-Web-Backlog board.
Jdlrobson added a subscriber: Jdlrobson.

Change 489749 merged by jenkins-bot:
[mediawiki/skins/MinervaNeue@master] Revert "Hygiene: Track minerva errors count only once"

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

Jdlrobson lowered the priority of this task from Normal to Low.Feb 20 2019, 6:23 PM