alerts.ts 802 B

123456789101112131415161718192021222324
  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. spm: {
  6. aggregate: 'spm()',
  7. },
  8. duration: {
  9. aggregate: 'avg(d:spans/duration@millisecond)',
  10. },
  11. decodedSize: {
  12. aggregate: `avg(d:spans/${SpanMetricsField.HTTP_DECODED_RESPONSE_CONTENT_LENGTH}@byte)`,
  13. name: t('Create Decoded Size Alert'),
  14. },
  15. transferSize: {
  16. aggregate: `avg(d:spans/${SpanMetricsField.HTTP_RESPONSE_TRANSFER_SIZE}@byte)`,
  17. name: t('Create Transfer Size Alert'),
  18. },
  19. encodedSize: {
  20. aggregate: `avg(d:spans/${SpanMetricsField.HTTP_RESPONSE_CONTENT_LENGTH}@byte)`,
  21. name: t('Create Encoded Size Alert'),
  22. },
  23. };