Merge "Make statsd sampling rates configurable"
[lhc/web/wiklou.git] / includes / GlobalFunctions.php
index 0d66908..b421f96 100644 (file)
@@ -1195,6 +1195,7 @@ function wfLogProfilingData() {
                        $statsdPort = isset( $statsdServer[1] ) ? $statsdServer[1] : 8125;
                        $statsdSender = new SocketSender( $statsdHost, $statsdPort );
                        $statsdClient = new SamplingStatsdClient( $statsdSender, true, false );
+                       $statsdClient->setSamplingRates( $config->get( 'StatsdSamplingRates' ) );
                        $statsdClient->send( $context->getStats()->getBuffer() );
                } catch ( Exception $ex ) {
                        MWExceptionHandler::logException( $ex );