eventEntryStacktrace.ts 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262
  1. import {type EntryStacktrace, EntryType} from 'sentry/types/event';
  2. export function EventEntryStacktraceFixture(params = {}): EntryStacktrace {
  3. return {
  4. type: EntryType.STACKTRACE,
  5. data: {
  6. framesOmitted: null,
  7. hasSystemFrames: false,
  8. registers: null,
  9. frames: [
  10. {
  11. filename: 'raven/base.py',
  12. absPath: '/home/ubuntu/.virtualenvs/getsentry/src/raven/raven/base.py',
  13. module: 'raven.base',
  14. package: null,
  15. platform: null,
  16. instructionAddr: null,
  17. symbolAddr: null,
  18. function: 'build_msg',
  19. rawFunction: null,
  20. symbol: null,
  21. context: [
  22. [298, ' frames = stack'],
  23. [299, ''],
  24. [300, ' data.update({'],
  25. [301, " 'sentry.interfaces.Stacktrace': {"],
  26. [302, " 'frames': get_stack_info(frames,"],
  27. [303, ' transformer=self.transform)'],
  28. [304, ' },'],
  29. [305, ' })'],
  30. [306, ''],
  31. [307, " if 'sentry.interfaces.Stacktrace' in data:"],
  32. [308, ' if self.include_paths:'],
  33. ],
  34. lineNo: 303,
  35. colNo: null,
  36. inApp: false,
  37. trust: null,
  38. vars: {
  39. "'culprit'": null,
  40. "'data'": {
  41. "'message'": "u'This is a test message generated using ``raven test``'",
  42. "'sentry.interfaces.Message'": {
  43. "'message'": "u'This is a test message generated using ``raven test``'",
  44. "'params'": [],
  45. },
  46. },
  47. "'date'": 'datetime.datetime(2013, 8, 13, 3, 8, 24, 880386)',
  48. "'event_id'": "'54a322436e1b47b88e239b78998ae742'",
  49. "'event_type'": "'raven.events.Message'",
  50. "'extra'": {
  51. "'go_deeper'": [['{"\'bar\'":["\'baz\'"],"\'foo\'":"\'bar\'"}']],
  52. "'loadavg'": [0.37255859375, 0.5341796875, 0.62939453125],
  53. "'user'": "'dcramer'",
  54. },
  55. "'frames'": '<generator object iter_stack_frames at 0x107bcc3c0>',
  56. "'handler'": '<raven.events.Message object at 0x107bd0890>',
  57. "'k'": "'sentry.interfaces.Message'",
  58. "'kwargs'": {
  59. "'level'": 20,
  60. "'message'": "'This is a test message generated using ``raven test``'",
  61. },
  62. "'public_key'": null,
  63. "'result'": {
  64. "'message'": "u'This is a test message generated using ``raven test``'",
  65. "'sentry.interfaces.Message'": {
  66. "'message'": "u'This is a test message generated using ``raven test``'",
  67. "'params'": [],
  68. },
  69. },
  70. "'self'": '<raven.base.Client object at 0x107bb8210>',
  71. "'stack'": true,
  72. "'tags'": null,
  73. "'time_spent'": null,
  74. "'v'": {
  75. "'message'": "u'This is a test message generated using ``raven test``'",
  76. "'params'": [],
  77. },
  78. },
  79. minGroupingLevel: 4,
  80. },
  81. {
  82. filename: 'raven/base.py',
  83. absPath: '/home/ubuntu/.virtualenvs/getsentry/src/raven/raven/base.py',
  84. module: 'raven.base',
  85. package: null,
  86. platform: null,
  87. instructionAddr: null,
  88. symbolAddr: null,
  89. function: 'capture',
  90. rawFunction: null,
  91. symbol: null,
  92. context: [
  93. [454, ' if not self.is_enabled():'],
  94. [455, ' return'],
  95. [456, ''],
  96. [457, ' data = self.build_msg('],
  97. [
  98. 458,
  99. ' event_type, data, date, time_spent, extra, stack, tags=tags,',
  100. ],
  101. [459, ' **kwargs)'],
  102. [460, ''],
  103. [461, ' self.send(**data)'],
  104. [462, ''],
  105. [463, " return (data.get('event_id'),)"],
  106. [464, ''],
  107. ],
  108. lineNo: 459,
  109. colNo: null,
  110. inApp: false,
  111. trust: null,
  112. vars: {
  113. "'data'": null,
  114. "'date'": null,
  115. "'event_type'": "'raven.events.Message'",
  116. "'extra'": {
  117. "'go_deeper'": [['{"\'bar\'":["\'baz\'"],"\'foo\'":"\'bar\'"}']],
  118. "'loadavg'": [0.37255859375, 0.5341796875, 0.62939453125],
  119. "'user'": "'dcramer'",
  120. },
  121. "'kwargs'": {
  122. "'level'": 20,
  123. "'message'": "'This is a test message generated using ``raven test``'",
  124. },
  125. "'self'": '<raven.base.Client object at 0x107bb8210>',
  126. "'stack'": true,
  127. "'tags'": null,
  128. "'time_spent'": null,
  129. },
  130. minGroupingLevel: 3,
  131. },
  132. {
  133. filename: 'raven/base.py',
  134. absPath: '/home/ubuntu/.virtualenvs/getsentry/src/raven/raven/base.py',
  135. module: 'raven.base',
  136. package: null,
  137. platform: null,
  138. instructionAddr: null,
  139. symbolAddr: null,
  140. function: 'captureMessage',
  141. rawFunction: null,
  142. symbol: null,
  143. context: [
  144. [572, ' """'],
  145. [573, ' Creates an event from ``message``.'],
  146. [574, ''],
  147. [575, " >>> client.captureMessage('My event just happened!')"],
  148. [576, ' """'],
  149. [
  150. 577,
  151. " return self.capture('raven.events.Message', message=message, **kwargs)",
  152. ],
  153. [578, ''],
  154. [579, ' def captureException(self, exc_info=None, **kwargs):'],
  155. [580, ' """'],
  156. [581, ' Creates an event from an exception.'],
  157. [582, ''],
  158. ],
  159. lineNo: 577,
  160. colNo: null,
  161. inApp: false,
  162. trust: null,
  163. vars: {
  164. "'kwargs'": {
  165. "'data'": null,
  166. "'extra'": {
  167. "'go_deeper'": ['[{"\'bar\'":["\'baz\'"],"\'foo\'":"\'bar\'"}]'],
  168. "'loadavg'": [0.37255859375, 0.5341796875, 0.62939453125],
  169. "'user'": "'dcramer'",
  170. },
  171. "'level'": 20,
  172. "'stack'": true,
  173. "'tags'": null,
  174. },
  175. "'message'": "'This is a test message generated using ``raven test``'",
  176. "'self'": '<raven.base.Client object at 0x107bb8210>',
  177. },
  178. minGroupingLevel: 2,
  179. },
  180. {
  181. filename: 'raven/scripts/runner.py',
  182. absPath:
  183. '/home/ubuntu/.virtualenvs/getsentry/src/raven/raven/scripts/runner.py',
  184. module: 'raven.scripts.runner',
  185. package: null,
  186. platform: null,
  187. instructionAddr: null,
  188. symbolAddr: null,
  189. function: 'send_test_message',
  190. rawFunction: null,
  191. symbol: null,
  192. context: [
  193. [72, ' level=logging.INFO,'],
  194. [73, ' stack=True,'],
  195. [74, " tags=options.get('tags', {}),"],
  196. [75, ' extra={'],
  197. [76, " 'user': get_uid(),"],
  198. [77, " 'loadavg': get_loadavg(),"],
  199. [78, ' },'],
  200. [79, ' ))'],
  201. [80, ''],
  202. [81, ' if client.state.did_fail():'],
  203. [82, " print('error!')"],
  204. ],
  205. lineNo: 77,
  206. colNo: null,
  207. inApp: false,
  208. trust: null,
  209. vars: {
  210. "'client'": '<raven.base.Client object at 0x107bb8210>',
  211. "'data'": null,
  212. "'k'": '[Filtered]',
  213. "'options'": {
  214. "'data'": null,
  215. "'tags'": null,
  216. },
  217. },
  218. minGroupingLevel: 1,
  219. },
  220. {
  221. filename: 'raven/scripts/runner.py',
  222. absPath:
  223. '/home/ubuntu/.virtualenvs/getsentry/src/raven/raven/scripts/runner.py',
  224. module: 'raven.scripts.runner',
  225. package: null,
  226. platform: null,
  227. instructionAddr: null,
  228. symbolAddr: null,
  229. function: 'main',
  230. rawFunction: null,
  231. symbol: null,
  232. context: [
  233. [107, ' print("Using DSN configuration:")'],
  234. [108, ' print(" ", dsn)'],
  235. [109, ' print()'],
  236. [110, ''],
  237. [111, " client = Client(dsn, include_paths=['raven'])"],
  238. [112, ' send_test_message(client, opts.__dict__)'],
  239. ],
  240. lineNo: 112,
  241. colNo: null,
  242. inApp: false,
  243. trust: null,
  244. vars: {
  245. "'args'": [
  246. "'test'",
  247. "'https://ebc35f33e151401f9deac549978bda11:[Filtered]@sentry.io/1'",
  248. ],
  249. "'client'": '<raven.base.Client object at 0x107bb8210>',
  250. "'dsn'": "'https://ebc35f33e151401f9deac549978bda11:[Filtered]@sentry.io/1'",
  251. "'opts'": "<Values at 0x107ba3b00: {'data': None, 'tags': None}>",
  252. "'parser'": '<optparse.OptionParser instance at 0x107ba3368>',
  253. "'root'": '<logging.Logger object at 0x107ba5b10>',
  254. },
  255. minGroupingLevel: 0,
  256. },
  257. ],
  258. },
  259. ...params,
  260. };
  261. }