data.tsx 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. import {t} from 'app/locale';
  2. import {NewQuery} from 'app/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. },
  51. ];
  52. export const ALL_VIEWS: Readonly<Array<NewQuery>> = [
  53. DEFAULT_EVENT_VIEW,
  54. {
  55. id: undefined,
  56. name: t('Errors by Title'),
  57. fields: ['title', 'count()', 'count_unique(user)', 'project'],
  58. orderby: '-count',
  59. query: 'event.type:error',
  60. projects: [],
  61. version: 2,
  62. range: '24h',
  63. display: 'top5',
  64. },
  65. {
  66. id: undefined,
  67. name: t('Errors by URL'),
  68. fields: ['url', 'count()', 'count_unique(issue)'],
  69. orderby: '-count',
  70. query: 'event.type:error has:url',
  71. projects: [],
  72. version: 2,
  73. range: '24h',
  74. display: 'top5',
  75. },
  76. ];