migrationUi.tsx 357 B

1234567891011
  1. import type {MetricRule} from 'sentry/views/alerts/rules/metric/types';
  2. import {Dataset} from 'sentry/views/alerts/rules/metric/types';
  3. export const ruleNeedsErrorMigration = (rule: MetricRule): boolean => {
  4. return (
  5. 'dataset' in rule &&
  6. rule.dataset === Dataset.ERRORS &&
  7. 'query' in rule &&
  8. !rule.query.includes('is:unresolved')
  9. );
  10. };