This allows other code paths to use the variable without hardcoding
the default (e.g. ExtensionDistributor).
Change-Id: Ia43ab5eda70d4b9952b4e0ad3334f884919b4dac
$wgStatsdServer = false;
/**
- * Prefix for metric names sent to wgStatsdServer.
- *
- * Defaults to "MediaWiki".
+ * Prefix for metric names sent to $wgStatsdServer.
*
* @see RequestContext::getStats
* @see BufferingStatsdDataFactory
* @since 1.25
*/
-$wgStatsdMetricPrefix = false;
+$wgStatsdMetricPrefix = 'MediaWiki';
/**
* InfoAction retrieves a list of transclusion links (both to and from).
*/
public function getStats() {
if ( $this->stats === null ) {
- $config = $this->getConfig();
- $prefix = $config->get( 'StatsdMetricPrefix' )
- ? rtrim( $config->get( 'StatsdMetricPrefix' ), '.' )
- : 'MediaWiki';
+ $prefix = rtrim( $this->getConfig()->get( 'StatsdMetricPrefix' ), '.' );
$this->stats = new BufferingStatsdDataFactory( $prefix );
}
return $this->stats;