Commit graph

5 commits

Author SHA1 Message Date
Ori Livneh
2bad0b9664 Make the format of UDP-logged stats configurable
The format of datagrams generated by StatCounter and ProfilerSimpleUDP is not
described by any standard and appears to have been designed for compatibility
with the logging setup of the Wikimedia Foundation, which limits reusability.

This patch adds two configuration variables, $wgUDPProfilerFormatString and
$wgStatsFormatString, that can be used to specify the precise format that
MediaWiki will use. The default values for these variables causes MediaWiki to
generate the same output as before.

The secret evil plan is to change the defaults so that MediaWiki emits metrics
that are compatible with the popular StatsD format (see
<https://github.com/b/statsd_spec>). This would allow us to replace udpprofiler
with a generic StatsD instance instead.

Change-Id: Iaf00811d3f8d6b89c1c68e84fc1f2c93425d5a2d
2013-10-04 22:52:02 -07:00
Aaron Schulz
6408088e25 StatCounter doc tweaks.
Change-Id: I8882e142170841c70cb620e1ea0246facc30f046
2013-04-23 11:27:27 +00:00
Aaron Schulz
37ad5d6a10 Batch all StatCounter stats into one datagram in flush().
Change-Id: I50a2cd24764e0a284c4a1138f8424ebf3990792e
2013-04-09 12:13:03 -07:00
Aaron Schulz
38ce5d8703 Removed "flush on destruct" from StatCounter.
Change-Id: Ib6ff0680d858e12969259997da163d0d696d65eb
2013-04-01 10:36:50 -07:00
Aaron Schulz
5f1e95436e Avoid sending multiple UDP packets for the same key in wfIncrStats().
* This should help reduce collector data loss.

Change-Id: Ibe55648422d1b8aac86dd6fa83973d3c8715b0aa
2013-03-29 12:01:42 -07:00