data.tsx 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. import {t} from 'sentry/locale';
  2. import {NewQuery} from 'sentry/types';
  3. export const DEFAULT_EVENT_VIEW: Readonly<NewQuery> = {
  4. id: undefined,
  5. name: t('All Events'),
  6. query: '',
  7. projects: [],
  8. fields: ['title', 'event.type', 'project', 'user.display', 'timestamp'],
  9. orderby: '-timestamp',
  10. version: 2,
  11. range: '24h',
  12. };
  13. export const TRANSACTION_VIEWS: Readonly<Array<NewQuery>> = [
  14. {
  15. id: undefined,
  16. name: t('Transactions by Volume'),
  17. fields: [
  18. 'transaction',
  19. 'project',
  20. 'count()',
  21. 'avg(transaction.duration)',
  22. 'p75()',
  23. 'p95()',
  24. ],
  25. orderby: '-count',
  26. query: 'event.type:transaction',
  27. projects: [],
  28. version: 2,
  29. range: '24h',
  30. },
  31. ];
  32. export const WEB_VITALS_VIEWS: Readonly<Array<NewQuery>> = [
  33. {
  34. id: undefined,
  35. name: t('Web Vitals'),
  36. fields: [
  37. 'transaction',
  38. 'epm()',
  39. 'p75(measurements.fp)',
  40. 'p75(measurements.fcp)',
  41. 'p75(measurements.lcp)',
  42. 'p75(measurements.fid)',
  43. 'p75(measurements.cls)',
  44. ],
  45. orderby: '-epm',
  46. query: 'event.type:transaction transaction.op:pageload',
  47. projects: [],
  48. version: 2,
  49. range: '24h',
  50. yAxis: ['epm()'],
  51. },
  52. ];
  53. export const ALL_VIEWS: Readonly<Array<NewQuery>> = [
  54. DEFAULT_EVENT_VIEW,
  55. {
  56. id: undefined,
  57. name: t('Errors by Title'),
  58. fields: ['title', 'count()', 'count_unique(user)', 'project'],
  59. orderby: '-count',
  60. query: 'event.type:error',
  61. projects: [],
  62. version: 2,
  63. range: '24h',
  64. display: 'top5',
  65. },
  66. {
  67. id: undefined,
  68. name: t('Errors by URL'),
  69. fields: ['url', 'count()', 'count_unique(issue)'],
  70. orderby: '-count',
  71. query: 'event.type:error has:url',
  72. projects: [],
  73. version: 2,
  74. range: '24h',
  75. display: 'top5',
  76. },
  77. ];