eventEntryStacktrace.ts 9.3 KB

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