public StatsdService(IList<IBackend> backends, StatsdServiceConfig config = null) { _backends = backends; _handlers.Add(MetricTypeContants.Counter, HandleCounter); _handlers.Add(MetricTypeContants.Gauge, HandleGauge); _handlers.Add(MetricTypeContants.Set, HandleSet); _handlers.Add(MetricTypeContants.Timer, HandleTimer); _activeSnapshot = new ActiveSnapshot(); _config = config ?? new StatsdServiceConfig(); }
public IStatsdServiceBuilder UseConfig(StatsdServiceConfig config) { _config = config; return this; }