Move populate_metric_ids.