isCustomMetricAlert.tsx 288 B

12345678
  1. import {parseField, parseMRI} from 'sentry/utils/metrics/mri';
  2. /**
  3. * Currently we can tell if an alert is a custom metric alert by checking the aggregate for a MRI,
  4. */
  5. export function isCustomMetricAlert(aggregate: string): boolean {
  6. return !!parseMRI(parseField(aggregate)?.mri);
  7. }