events.ts 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. import {type Event, EventOrGroupType} from 'sentry/types/event';
  2. import {EventsStats} from 'sentry/types/organization';
  3. export function EventsStatsFixture(params = {}): EventsStats {
  4. return {
  5. data: [
  6. [new Date().getTime(), [{count: 321}, {count: 79}]],
  7. [new Date().getTime(), [{count: 123}]],
  8. ],
  9. ...params,
  10. };
  11. }
  12. export function DetailedEventsFixture(): Event[] {
  13. return [
  14. {
  15. eventID: '807f0de4d8c246098f21f8e0f1684f3d',
  16. packages: {},
  17. dist: null,
  18. tags: [
  19. {value: 'Chrome 59.0.3071', key: 'browser'},
  20. {value: 'Chrome', key: 'browser.name'},
  21. {value: 'error', key: 'level'},
  22. {value: 'javascript', key: 'logger'},
  23. {value: 'Mac OS X 10.12.5', key: 'os'},
  24. {value: 'Mac OS X', key: 'os.name'},
  25. {value: 'd5241c9d9d2bcda918c7af72f07cea1e39a096ac', key: 'release'},
  26. {
  27. value: 'app/components/assigneeSelector in assignedTo',
  28. key: 'transaction',
  29. },
  30. {
  31. value: 'http://localhost:8000/sentry/internal/issues/227/grouping/',
  32. key: 'url',
  33. },
  34. {value: 'id:1', key: 'user'},
  35. ],
  36. contexts: {
  37. os: {
  38. version: '10.12.5',
  39. type: 'os',
  40. name: 'Mac OS X',
  41. build: '',
  42. kernel_version: '',
  43. },
  44. browser: {version: '59.0.3071', name: 'Chrome'},
  45. },
  46. dateReceived: '2017-07-26T00:34:20Z',
  47. dateCreated: '2017-07-26T00:34:20Z',
  48. fingerprints: [
  49. '2c4887696f708c476a81ce4e834c4b02',
  50. 'e05da55328a860b21f62e371f0a7507d',
  51. ],
  52. metadata: {
  53. type: 'TypeError',
  54. value: "Cannot read property 'assignedTo' of undefined",
  55. },
  56. groupID: '268',
  57. platform: 'javascript',
  58. errors: [],
  59. user: {ip_address: '127.0.0.1', email: 'billy@sentry.io', id: '1'},
  60. context: {'session:duration': 46363},
  61. entries: [],
  62. title: "TypeError: Cannot read property 'assignedTo' of undefined",
  63. message:
  64. "TypeError Cannot read property 'assignedTo' of undefined app/components/assigneeSelector in assignedTo",
  65. sdk: {
  66. version: '3.16.1',
  67. name: 'raven-js',
  68. },
  69. type: EventOrGroupType.ERROR,
  70. id: '904',
  71. size: 21896,
  72. crashFile: null,
  73. culprit: 'callback(app/utils/handleXhrErrorResponse)',
  74. location: './app/utils/handleXhrErrorResponse.tsx',
  75. occurrence: null,
  76. projectID: '1',
  77. resolvedWith: [],
  78. },
  79. {
  80. eventID: '807f0de4d8c246098f21f8e0f1684f3d',
  81. packages: {},
  82. dist: null,
  83. tags: [
  84. {value: 'Chrome 59.0.3071', key: 'browser'},
  85. {value: 'Chrome', key: 'browser.name'},
  86. {value: 'error', key: 'level'},
  87. {value: 'javascript', key: 'logger'},
  88. {value: 'Mac OS X 10.12.5', key: 'os'},
  89. {value: 'Mac OS X', key: 'os.name'},
  90. {value: 'd5241c9d9d2bcda918c7af72f07cea1e39a096ac', key: 'release'},
  91. {
  92. value: 'app/components/assigneeSelector in assignedTo',
  93. key: 'transaction',
  94. },
  95. {
  96. value: 'http://localhost:8000/sentry/internal/issues/227/grouping/',
  97. key: 'url',
  98. },
  99. {value: 'id:1', key: 'user'},
  100. ],
  101. contexts: {
  102. os: {
  103. version: '10.12.5',
  104. type: 'os',
  105. name: 'Mac OS X',
  106. build: '',
  107. kernel_version: '',
  108. },
  109. browser: {version: '59.0.3071', name: 'Chrome'},
  110. },
  111. dateReceived: '2017-07-26T00:34:20Z',
  112. dateCreated: '2017-07-26T00:34:20Z',
  113. fingerprints: [
  114. '2c4887696f708c476a81ce4e834c4b02',
  115. 'e05da55328a860b21f62e371f0a7507d',
  116. ],
  117. metadata: {
  118. type: 'TypeError',
  119. value: "Cannot read property 'assignedTo' of undefined",
  120. },
  121. groupID: '268',
  122. platform: 'javascript',
  123. errors: [],
  124. user: {ip_address: '127.0.0.1', email: 'billy@sentry.io', id: '1'},
  125. context: {'session:duration': 46363},
  126. entries: [],
  127. title: "TypeError: Cannot read property 'assignedTo' of undefined",
  128. message:
  129. "TypeError Cannot read property 'assignedTo' of undefined app/components/assigneeSelector in assignedTo",
  130. sdk: {
  131. version: '3.16.1',
  132. name: 'raven-js',
  133. },
  134. type: EventOrGroupType.ERROR,
  135. id: '905',
  136. size: 21896,
  137. crashFile: null,
  138. culprit: 'callback(app/utils/handleXhrErrorResponse)',
  139. location: './app/utils/handleXhrErrorResponse.tsx',
  140. occurrence: null,
  141. projectID: '1',
  142. resolvedWith: [],
  143. },
  144. ];
  145. }