Description
Currently CustomMetrics uses `getCanonicalName` to get the metric type name
But when using reflection we need to use the original type name.
Here is an example when working with an inner class
Class.getName = org.apache.iceberg.spark.source.SparkBatchScan$FilesScannedMetric Class.getCanonicalName = org.apache.iceberg.spark.source.SparkBatchScan.FilesScannedMetric
The "$" name is required to look up this class while the "." version will fail with CNF.