Ori.livneh has uploaded a new change for review.
https://gerrit.wikimedia.org/r/226133
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
---
M includes/libs/BufferingStatsdDataFactory.php
1 file changed, 2 insertions(+), 2 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/33/226133/1
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/226133
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I22baa81a88a3e0bc0d5b8b58bd6bb922c58a3255
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Ori.livneh <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits