Merge "Increase $wgSVGMaxSize to 5120 pixels wide (previously 2048)."
[lhc/web/wiklou.git] / includes / libs / BufferingStatsdDataFactory.php
index 192b119..3d7fad5 100644 (file)
@@ -42,7 +42,7 @@ class BufferingStatsdDataFactory extends StatsdDataFactory {
        /**
         * Normalize a metric key for StatsD
         *
-        * Replace occurences of '::' with dots and any other non-alphabetic
+        * Replace occurences of '::' with dots and any other non-alphanumeric
         * characters with underscores. Combine runs of dots or underscores.
         * Then trim leading or trailing dots or underscores.
         *
@@ -51,7 +51,7 @@ class BufferingStatsdDataFactory extends StatsdDataFactory {
         */
        private static function normalizeMetricKey( $key ) {
                $key = preg_replace( '/[:.]+/', '.', $key );
-               $key = preg_replace( '/[^a-z.]+/i', '_', $key );
+               $key = preg_replace( '/[^a-z0-9.]+/i', '_', $key );
                $key = trim( $key, '_.' );
                return str_replace( array( '._', '_.' ), '.', $key );
        }