Ori.livneh has submitted this change and it was merged. Change subject: Allow numeric statsd key name components ......................................................................
Allow numeric statsd key name components Make sure BufferingStatsdDataFactory::normalizeMetricKey() doesn't delete digits in key names. Change-Id: I22baa81a88a3e0bc0d5b8b58bd6bb922c58a3255 (cherry picked from commit 848ad3d990a6758cee83aa7c804e6fd318c77985) --- M includes/libs/BufferingStatsdDataFactory.php 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Ori.livneh: Verified; Looks good to me, approved diff --git a/includes/libs/BufferingStatsdDataFactory.php b/includes/libs/BufferingStatsdDataFactory.php index 192b119..3d7fad5 100644 --- a/includes/libs/BufferingStatsdDataFactory.php +++ b/includes/libs/BufferingStatsdDataFactory.php @@ -42,7 +42,7 @@ /** * 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 @@ */ 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 ); } -- To view, visit https://gerrit.wikimedia.org/r/226213 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I22baa81a88a3e0bc0d5b8b58bd6bb922c58a3255 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: wmf/1.26wmf14 Gerrit-Owner: Ori.livneh <o...@wikimedia.org> Gerrit-Reviewer: Ori.livneh <o...@wikimedia.org> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits