message: throw errors for multiple defaults
diff: import { Metric } from '../types';
  export function validateMetrics(metrics: Metric[]) {
  - let defaultMetric = null;
  - for (const metric of metrics) {
  - if (metric.default) {
  - if (defaultMetric) {
  + const defaults = metrics.filter(metric => metric.default);
  + if (defaults.length > 1) {
  throw new Error(
  - `Cannot set default for multiple metrics: Received: ${defaultMetric.kind} and ${metric.kind}`,
  + `Only one default metric can be set at a time. Found ${defaults.length}`,
  );
  - } else {
  - defaultMetric = metric;
  - }
  - }
  }
  }
  