Fix unused import
Remove code in CoreMetrics/Metric deprecated in 2.x