Move StatsD key normalization from ProfilerOutputStats to BufferingStatsdDataFactory
authorOri Livneh <ori@wikimedia.org>
Mon, 13 Jul 2015 18:26:27 +0000 (11:26 -0700)
committerBryanDavis <bdavis@wikimedia.org>
Mon, 13 Jul 2015 19:07:02 +0000 (19:07 +0000)
commit0a25d776adb79d8c7d2cee78c4edea79a65bf18d
tree540ed24161eaeefd88b408e008bde8d14fa52571
parent64b27eddd570e05a93cf7fb86e2dfe53d830a301
Move StatsD key normalization from ProfilerOutputStats to BufferingStatsdDataFactory

I'm not sure why I stuck `normalizeMetricKey' in ProfilerOutputStats, because
the transformation it applies are suitable for converting any arbitrary string
into a StatsD-safe metric key. This patch moves the method to
BufferingStatsdDataFactory, which ensures it applies to all metrics logged
within MediaWiki, and not just the Profiler.

Supercedes If0237cdd0d.

Change-Id: I496ed748000d28f5399fee6e3cc271a1f68bd058
includes/libs/BufferingStatsdDataFactory.php
includes/profiler/output/ProfilerOutputStats.php