Split statsd metrics by wiki

This way we can track the progress of individual wikis in cleaning up
errors. The wiki name is at the end of the key so we can still use
e.g. "linter.category.$name.*" to see across all wikis at once.

Change-Id: I62463b9256e125d32d97396bd939334d71b46027
This commit is contained in:
Kunal Mehta 2017-04-06 11:21:41 -07:00
parent 619ddc8677
commit eacb3c0d0d

View file

@ -84,13 +84,14 @@ class RecordLintJob extends Job {
}
$totals = $lintDb->getTotals();
$wiki = wfWikiID();
$stats = MediaWikiServices::getInstance()->getStatsdDataFactory();
foreach ( $totals as $name => $count ) {
$stats->gauge( "linter.category.$name", $count );
$stats->gauge( "linter.category.$name.$wiki", $count );
}
$stats->gauge( "linter.totals", array_sum( $totals ) );
$stats->gauge( "linter.totals.$wiki", array_sum( $totals ) );
}
}