Errors can be counted in statsv

Bug: T205582
Change-Id: I8f67b8356ac271872cac39a416ffefce47959177
This commit is contained in:
jdlrobson 2018-10-04 14:31:30 -07:00
parent 943a4df894
commit 07a3b81c91
4 changed files with 10 additions and 0 deletions

View file

@ -36,6 +36,11 @@ for the page.
Controls whether site notices should be shown.
See <https://www.mediawiki.org/wiki/Manual:$wgSiteNotice>.
#### $wgMinervaCountErrors
* Type: `Boolean`
* Default: `false`
Whether to count client side errors in statsv.
#### $wgMinervaErrorLogSamplingRate
* Type: `Integer`

View file

@ -197,6 +197,7 @@ class MinervaHooks {
'wgMinervaSchemaMainMenuClickTrackingSampleRate' =>
$config->get( 'MinervaSchemaMainMenuClickTrackingSampleRate' ),
'wgMinervaABSamplingRate' => $config->get( 'MinervaABSamplingRate' ),
'wgMinervaCountErrors' => $config->get( 'MinervaCountErrors' ),
'wgMinervaErrorLogSamplingRate' => $config->get( 'MinervaErrorLogSamplingRate' ),
'wgMinervaReadOnly' => wfReadOnly()
];

View file

@ -45,6 +45,9 @@
}, DEFAULT_ERROR_DATA )
);
}
if ( config.get( 'wgMinervaCountErrors' ) ) {
mw.track( 'counter.MediaWiki.minerva.WebClientError', 1 );
}
}
// track RL exceptions
trackSubscribe( 'resourceloader.exception', function ( topic, data ) {

View file

@ -22,6 +22,7 @@
}
},
"config": {
"MinervaCountErrors": false,
"MinervaErrorLogSamplingRate": 0,
"MinervaDownloadNamespaces": [ 0 ],
"MinervaEnableSiteNotice": false,