mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/WikiEditor
synced 2024-11-24 00:06:49 +00:00
Collect only 25% of WikiEditor events
By checking the first character of our session ID (which is just a random hex digit) Bug: T93201 Change-Id: If1f7e7c4da6c3f37533a6feba56ff6422f5b9750
This commit is contained in:
parent
a4e7c8dbb4
commit
d317164aeb
|
@ -154,6 +154,10 @@ class WikiEditorHooks {
|
|||
if ( !class_exists( 'EventLogging' ) ) {
|
||||
return false;
|
||||
}
|
||||
// Sample 25% (via hex digit)
|
||||
if ( $data['editingSessionId'][0] > '3' ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$user = $article->getContext()->getUser();
|
||||
$page = $article->getPage();
|
||||
|
@ -257,6 +261,11 @@ class WikiEditorHooks {
|
|||
if ( !$editingStatsId ) {
|
||||
$editingStatsId = self::getEditingStatsId();
|
||||
}
|
||||
// Sample 25% (via hex digit)
|
||||
if ( $editingStatsId[0] > '3' ) {
|
||||
return true;
|
||||
}
|
||||
|
||||
$outputPage->addHTML(
|
||||
Xml::element(
|
||||
'input',
|
||||
|
|
Loading…
Reference in a new issue