private static void CreateStatsD(MetricsConfig config)
{
if (_statsdUdp != null)
{
_statsdUdp.Dispose();
}
_statsdUdp = null;
if (!string.IsNullOrEmpty(config.StatsdServerName))
{
_statsdUdp = new StatsdUDP(config.StatsdServerName, config.StatsdServerPort, config.StatsdMaxUDPPacketSize);
_statsD = new Statsd(_statsdUdp);
}
}