// tenantId can be null!
private static Collection<PreaggregatedMetric> remarshalGauges(Bundle bundle, String tenantId) throws IOException {
final Collection<Gauge> gauges = bundle.getGauges();
final List<PreaggregatedMetric> metrics = new ArrayList<PreaggregatedMetric>(gauges.size());
for (Gauge g : gauges) {
Locator locator = Locator.createLocatorFromPathComponents(tenantId == null ? g.getTenant() : tenantId, splitForLocator(g.getName()));
Points<SimpleNumber> points = new Points<SimpleNumber>();
points.add(new Points.Point<SimpleNumber>(bundle.getCollectionTime(), new SimpleNumber(g.getValue())));
Rollup rollup = GaugeRollup.buildFromRawSamples(points);
PreaggregatedMetric metric = new PreaggregatedMetric(bundle.getCollectionTime(), locator, DEFAULT_PREAG_TTL, rollup);
metrics.add(metric);