alerts.ts 821 B

1234567891011121314151617181920212223242526
  1. import {t} from 'sentry/locale';
  2. import type {AlertConfig} from 'sentry/views/insights/common/components/chartPanel';
  3. import {SpanMetricsField} from 'sentry/views/insights/types';
  4. export const ALERTS: Record<string, AlertConfig> = {
  5. latency: {
  6. aggregate: `avg(g:spans/${SpanMetricsField.MESSAGING_MESSAGE_RECEIVE_LATENCY}@millisecond)`,
  7. query: 'span.op:queue.process',
  8. name: t('Create Time in Queue Alert'),
  9. },
  10. duration: {
  11. aggregate: 'avg(d:spans/duration@millisecond)',
  12. query: 'span.op:queue.process',
  13. name: t('Create Processing Time Alert'),
  14. },
  15. processed: {
  16. aggregate: 'spm()',
  17. query: 'span.op:queue.process',
  18. name: t('Create Processed Alert'),
  19. },
  20. published: {
  21. aggregate: 'spm()',
  22. query: 'span.op:queue.publish',
  23. name: t('Create Published Alert'),
  24. },
  25. };