Locator locator = Locator.createLocatorFromPathComponents(tenant, counter.getName().split(NAME_DELIMITER, -1));
// flushIntervalMillis could be zero (if not specified in the statsD config).
long sampleCount = flushIntervalMillis > 0
? (long)(counter.getRate().doubleValue() * ((double)flushIntervalMillis/1000d))
: 1;
Rollup rollup = new CounterRollup()
.withCount(resolveNumber(counter.getValue()))
.withRate(counter.getRate().doubleValue())
.withCount(sampleCount);
PreaggregatedMetric metric = new PreaggregatedMetric(timestamp, locator, DEFAULT_TTL, rollup);
list.add(metric);