From: addshore Date: Wed, 1 Aug 2018 21:22:13 +0000 (+0100) Subject: Fix PerDbnameStatsdDataFactory metric prefix again X-Git-Tag: 1.34.0-rc.0~4569^2 X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dmembres/Category:Foo?a=commitdiff_plain;h=7de2f11c1d5ef539388ab8eac9c0d805f2fcf8f0;p=lhc%2Fweb%2Fwiklou.git Fix PerDbnameStatsdDataFactory metric prefix again prefix = 'MediaWiki.' will result in 'MediaWiki..dbname' Preventing that is the only purpose of the rtrim(), we don't support whitespace there Change-Id: I72383aae908dbc89688cd3bebba36d389cde3f29 --- diff --git a/includes/ServiceWiring.php b/includes/ServiceWiring.php index 66b4c0c810..b2211ec646 100644 --- a/includes/ServiceWiring.php +++ b/includes/ServiceWiring.php @@ -137,7 +137,7 @@ return [ $config = $services->getMainConfig(); $wiki = $config->get( 'DBname' ); return new BufferingStatsdDataFactory( - rtrim( $services->getMainConfig()->get( 'StatsdMetricPrefix' ) ) . '.' . $wiki + rtrim( $services->getMainConfig()->get( 'StatsdMetricPrefix' ), '.' ) . '.' . $wiki ); },