mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Scribunto
synced 2024-11-23 15:56:55 +00:00
Migrate MediaWiki.scribunto.traces.* to statslib
Bug: T359275 Change-Id: Idd234bbb34747b4557dcded73eace69131a2566a
This commit is contained in:
parent
a7bf3cc073
commit
fed1972733
|
@ -279,11 +279,13 @@ class Hooks implements
|
|||
|
||||
static $stats;
|
||||
if ( !$stats ) {
|
||||
$stats = MediaWikiServices::getInstance()->getStatsdDataFactory();
|
||||
$stats = MediaWikiServices::getInstance()->getStatsFactory();
|
||||
}
|
||||
|
||||
$metricKey = sprintf( 'scribunto.traces.%s__%s__%s', WikiMap::getCurrentWikiId(), $moduleName, $functionName );
|
||||
$stats->timing( $metricKey, $timing );
|
||||
$statAction = WikiMap::getCurrentWikiId() . '__' . $moduleName . '__' . $functionName;
|
||||
$stats->getTiming( 'scribunto_traces_seconds' )
|
||||
->setLabel( 'action', $statAction )
|
||||
->copyToStatsdAt( 'scribunto.traces.' . $statAction )
|
||||
->observe( $timing );
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue