events.ts 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  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. },
  77. {
  78. eventID: '807f0de4d8c246098f21f8e0f1684f3d',
  79. packages: {},
  80. dist: null,
  81. tags: [
  82. {value: 'Chrome 59.0.3071', key: 'browser'},
  83. {value: 'Chrome', key: 'browser.name'},
  84. {value: 'error', key: 'level'},
  85. {value: 'javascript', key: 'logger'},
  86. {value: 'Mac OS X 10.12.5', key: 'os'},
  87. {value: 'Mac OS X', key: 'os.name'},
  88. {value: 'd5241c9d9d2bcda918c7af72f07cea1e39a096ac', key: 'release'},
  89. {
  90. value: 'app/components/assigneeSelector in assignedTo',
  91. key: 'transaction',
  92. },
  93. {
  94. value: 'http://localhost:8000/sentry/internal/issues/227/grouping/',
  95. key: 'url',
  96. },
  97. {value: 'id:1', key: 'user'},
  98. ],
  99. contexts: {
  100. os: {
  101. version: '10.12.5',
  102. type: 'os',
  103. name: 'Mac OS X',
  104. build: '',
  105. kernel_version: '',
  106. },
  107. browser: {version: '59.0.3071', name: 'Chrome'},
  108. },
  109. dateReceived: '2017-07-26T00:34:20Z',
  110. dateCreated: '2017-07-26T00:34:20Z',
  111. fingerprints: [
  112. '2c4887696f708c476a81ce4e834c4b02',
  113. 'e05da55328a860b21f62e371f0a7507d',
  114. ],
  115. metadata: {
  116. type: 'TypeError',
  117. value: "Cannot read property 'assignedTo' of undefined",
  118. },
  119. groupID: '268',
  120. platform: 'javascript',
  121. errors: [],
  122. user: {ip_address: '127.0.0.1', email: 'billy@sentry.io', id: '1'},
  123. context: {'session:duration': 46363},
  124. entries: [],
  125. title: "TypeError: Cannot read property 'assignedTo' of undefined",
  126. message:
  127. "TypeError Cannot read property 'assignedTo' of undefined app/components/assigneeSelector in assignedTo",
  128. sdk: {
  129. version: '3.16.1',
  130. name: 'raven-js',
  131. },
  132. type: EventOrGroupType.ERROR,
  133. id: '905',
  134. size: 21896,
  135. crashFile: null,
  136. culprit: 'callback(app/utils/handleXhrErrorResponse)',
  137. location: './app/utils/handleXhrErrorResponse.tsx',
  138. occurrence: null,
  139. projectID: '1',
  140. },
  141. ];
  142. }