Merge "Move inline $wgStatsdMetricPrefix default to DefaultSettings.php"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Mon, 14 Dec 2015 00:13:12 +0000 (00:13 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Mon, 14 Dec 2015 00:13:12 +0000 (00:13 +0000)
includes/DefaultSettings.php
includes/context/RequestContext.php

index bf85678..f68c0ef 100644 (file)
@@ -5707,15 +5707,13 @@ $wgProfileOnly = false;
 $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).
index a0073aa..9b6e1f3 100644 (file)
@@ -137,10 +137,7 @@ class RequestContext implements IContextSource, MutableContext {
         */
        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;