mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Linter
synced 2024-11-23 23:44:17 +00:00
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:
parent
619ddc8677
commit
eacb3c0d0d
|
@ -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 ) );
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue