events.ts 4.4 KB

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