public Metrics(IMetricsEmitter emitter, int batchSize = 1)
{
if (emitter == null)
{
throw new ArgumentNullException();
}
if (batchSize < 1)
{
throw new ArgumentException("Batch size must be at least 1");
}
this.emitter = emitter;
this.batchSize = batchSize;
this.properties = new Dictionary<string, string>();
this.metricQueue = new Metric[batchSize];
this.metricQueueIndex = 0;
}