py_error.json 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288
  1. {
  2. "level": "error",
  3. "exception": {
  4. "values": [
  5. {
  6. "module": null,
  7. "type": "Exception",
  8. "value": "This is a sample error",
  9. "mechanism": { "type": "django", "handled": false },
  10. "stacktrace": {
  11. "frames": [
  12. {
  13. "filename": "django/core/handlers/exception.py",
  14. "abs_path": "/usr/local/lib/python3.8/site-packages/django/core/handlers/exception.py",
  15. "function": "inner",
  16. "module": "django.core.handlers.exception",
  17. "lineno": 34,
  18. "pre_context": [
  19. " can rely on getting a response instead of an exception.",
  20. " \"\"\"",
  21. " @wraps(get_response)",
  22. " def inner(request):",
  23. " try:"
  24. ],
  25. "context_line": " response = get_response(request)",
  26. "post_context": [
  27. " except Exception as exc:",
  28. " response = response_for_exception(request, exc)",
  29. " return response",
  30. " return inner",
  31. ""
  32. ],
  33. "vars": {
  34. "request": "<WSGIRequest: GET '/api/0/make-sample-error/'>",
  35. "exc": "Exception('This is a sample error')",
  36. "get_response": "<bound method BaseHandler._get_response of <django.core.handlers.wsgi.WSGIHandler object at 0x7fccf51fbeb0>>"
  37. },
  38. "in_app": true
  39. },
  40. {
  41. "filename": "django/core/handlers/base.py",
  42. "abs_path": "/usr/local/lib/python3.8/site-packages/django/core/handlers/base.py",
  43. "function": "_get_response",
  44. "module": "django.core.handlers.base",
  45. "lineno": 115,
  46. "pre_context": [
  47. " if response is None:",
  48. " wrapped_callback = self.make_view_atomic(callback)",
  49. " try:",
  50. " response = wrapped_callback(request, *callback_args, **callback_kwargs)",
  51. " except Exception as e:"
  52. ],
  53. "context_line": " response = self.process_exception_by_middleware(e, request)",
  54. "post_context": [
  55. "",
  56. " # Complain if the view returned None (a common error).",
  57. " if response is None:",
  58. " if isinstance(callback, types.FunctionType): # FBV",
  59. " view_name = callback.__name__"
  60. ],
  61. "vars": {
  62. "self": "<django.core.handlers.wsgi.WSGIHandler object at 0x7fccf51fbeb0>",
  63. "request": "<WSGIRequest: GET '/api/0/make-sample-error/'>",
  64. "response": "None",
  65. "resolver": "<URLResolver 'glitchtip.urls' (None:None) '^/'>",
  66. "resolver_match": "ResolverMatch(func=issues.views.MakeSampleErrorView, args=(), kwargs={}, url_name=None, app_names=[], namespaces=[], route=api/0/make-sample-error/)",
  67. "callback": "<function MakeSampleErrorView at 0x7fccf1577af0>",
  68. "callback_args": [],
  69. "callback_kwargs": {},
  70. "middleware_method": "<function CorsMiddleware.process_view at 0x7fccf143c310>",
  71. "wrapped_callback": "<function MakeSampleErrorView at 0x7fccf1577af0>"
  72. },
  73. "in_app": true
  74. },
  75. {
  76. "filename": "django/core/handlers/base.py",
  77. "abs_path": "/usr/local/lib/python3.8/site-packages/django/core/handlers/base.py",
  78. "function": "_get_response",
  79. "module": "django.core.handlers.base",
  80. "lineno": 113,
  81. "pre_context": [
  82. " break",
  83. "",
  84. " if response is None:",
  85. " wrapped_callback = self.make_view_atomic(callback)",
  86. " try:"
  87. ],
  88. "context_line": " response = wrapped_callback(request, *callback_args, **callback_kwargs)",
  89. "post_context": [
  90. " except Exception as e:",
  91. " response = self.process_exception_by_middleware(e, request)",
  92. "",
  93. " # Complain if the view returned None (a common error).",
  94. " if response is None:"
  95. ],
  96. "vars": {
  97. "self": "<django.core.handlers.wsgi.WSGIHandler object at 0x7fccf51fbeb0>",
  98. "request": "<WSGIRequest: GET '/api/0/make-sample-error/'>",
  99. "response": "None",
  100. "resolver": "<URLResolver 'glitchtip.urls' (None:None) '^/'>",
  101. "resolver_match": "ResolverMatch(func=issues.views.MakeSampleErrorView, args=(), kwargs={}, url_name=None, app_names=[], namespaces=[], route=api/0/make-sample-error/)",
  102. "callback": "<function MakeSampleErrorView at 0x7fccf1577af0>",
  103. "callback_args": [],
  104. "callback_kwargs": {},
  105. "middleware_method": "<function CorsMiddleware.process_view at 0x7fccf143c310>",
  106. "wrapped_callback": "<function MakeSampleErrorView at 0x7fccf1577af0>"
  107. },
  108. "in_app": true
  109. },
  110. {
  111. "filename": "django/views/decorators/csrf.py",
  112. "abs_path": "/usr/local/lib/python3.8/site-packages/django/views/decorators/csrf.py",
  113. "function": "wrapped_view",
  114. "module": "django.views.decorators.csrf",
  115. "lineno": 54,
  116. "pre_context": [
  117. "def csrf_exempt(view_func):",
  118. " \"\"\"Mark a view function as being exempt from the CSRF view protection.\"\"\"",
  119. " # view_func.csrf_exempt = True would also work, but decorators are nicer",
  120. " # if they don't have side effects, so return a new function.",
  121. " def wrapped_view(*args, **kwargs):"
  122. ],
  123. "context_line": " return view_func(*args, **kwargs)",
  124. "post_context": [
  125. " wrapped_view.csrf_exempt = True",
  126. " return wraps(view_func)(wrapped_view)"
  127. ],
  128. "vars": {
  129. "args": ["<WSGIRequest: GET '/api/0/make-sample-error/'>"],
  130. "kwargs": {},
  131. "view_func": "<function MakeSampleErrorView at 0x7fccf1577a60>"
  132. },
  133. "in_app": true
  134. },
  135. {
  136. "filename": "django/views/generic/base.py",
  137. "abs_path": "/usr/local/lib/python3.8/site-packages/django/views/generic/base.py",
  138. "function": "view",
  139. "module": "django.views.generic.base",
  140. "lineno": 71,
  141. "pre_context": [
  142. " if not hasattr(self, 'request'):",
  143. " raise AttributeError(",
  144. " \"%s instance has no 'request' attribute. Did you override \"",
  145. " \"setup() and forget to call super()?\" % cls.__name__",
  146. " )"
  147. ],
  148. "context_line": " return self.dispatch(request, *args, **kwargs)",
  149. "post_context": [
  150. " view.view_class = cls",
  151. " view.view_initkwargs = initkwargs",
  152. "",
  153. " # take name and docstring from class",
  154. " update_wrapper(view, cls, updated=())"
  155. ],
  156. "vars": {
  157. "request": "<WSGIRequest: GET '/api/0/make-sample-error/'>",
  158. "args": [],
  159. "kwargs": {},
  160. "self": "<issues.views.MakeSampleErrorView object at 0x7fccf02df310>",
  161. "cls": "<class 'issues.views.MakeSampleErrorView'>",
  162. "initkwargs": {}
  163. },
  164. "in_app": true
  165. },
  166. {
  167. "filename": "rest_framework/views.py",
  168. "abs_path": "/usr/local/lib/python3.8/site-packages/rest_framework/views.py",
  169. "function": "dispatch",
  170. "module": "rest_framework.views",
  171. "lineno": 505,
  172. "pre_context": [
  173. " handler = self.http_method_not_allowed",
  174. "",
  175. " response = handler(request, *args, **kwargs)",
  176. "",
  177. " except Exception as exc:"
  178. ],
  179. "context_line": " response = self.handle_exception(exc)",
  180. "post_context": [
  181. "",
  182. " self.response = self.finalize_response(request, response, *args, **kwargs)",
  183. " return self.response",
  184. "",
  185. " def options(self, request, *args, **kwargs):"
  186. ],
  187. "vars": {
  188. "self": "<issues.views.MakeSampleErrorView object at 0x7fccf02df310>",
  189. "request": "<rest_framework.request.Request object at 0x7fccf02df580>",
  190. "args": [],
  191. "kwargs": {},
  192. "handler": "<bound method MakeSampleErrorView.get of <issues.views.MakeSampleErrorView object at 0x7fccf02df310>>"
  193. },
  194. "in_app": true
  195. }
  196. ]
  197. }
  198. }
  199. ]
  200. },
  201. "event_id": "6194a7e07a264f59aeca4de05701e412",
  202. "timestamp": "2019-12-08T15:49:28.805575Z",
  203. "breadcrumbs": [
  204. {
  205. "message": "SELECT \"django_session\".\"session_key\", \"django_session\".\"session_data\", \"django_session\".\"expire_date\" FROM \"django_session\" WHERE (\"django_session\".\"expire_date\" > %s AND \"django_session\".\"session_key\" = %s) LIMIT 21",
  206. "category": "query",
  207. "data": {},
  208. "timestamp": "2019-12-08T15:49:28.790692Z",
  209. "type": "default"
  210. },
  211. {
  212. "message": "SELECT \"users_user\".\"id\", \"users_user\".\"password\", \"users_user\".\"last_login\", \"users_user\".\"is_superuser\", \"users_user\".\"email\", \"users_user\".\"first_name\", \"users_user\".\"last_name\", \"users_user\".\"is_staff\", \"users_user\".\"is_active\" FROM \"users_user\" WHERE \"users_user\".\"id\" = %s LIMIT 21",
  213. "category": "query",
  214. "data": {},
  215. "timestamp": "2019-12-08T15:49:28.798710Z",
  216. "type": "default"
  217. }
  218. ],
  219. "transaction": "/api/0/make-sample-error/",
  220. "contexts": {
  221. "trace": {
  222. "trace_id": "9cb7c4e96dc44b1ead85c92d74b77159",
  223. "span_id": "a0386ffe901093bb",
  224. "parent_span_id": "a376f9408506b7e0",
  225. "op": "django.middleware",
  226. "description": "glitchtip.middleware.proxy.DecompressBodyMiddleware.__call__"
  227. },
  228. "runtime": {
  229. "name": "CPython",
  230. "version": "3.8.0",
  231. "build": "3.8.0 (default, Nov 23 2019, 05:49:00) \n[GCC 8.3.0]"
  232. }
  233. },
  234. "modules": {
  235. "wrapt": "1.11.2",
  236. "whitenoise": "4.1.4",
  237. "wheel": "0.33.6",
  238. "wcwidth": "0.1.7"
  239. },
  240. "extra": { "sys.argv": ["./manage.py", "runserver", "0.0.0.0:8000"] },
  241. "request": {
  242. "url": "http://localhost:8000/api/0/make-sample-error/",
  243. "query_string": "",
  244. "method": "GET",
  245. "env": { "SERVER_NAME": "81bf6d47de7c", "SERVER_PORT": "8000" },
  246. "headers": {
  247. "Content-Length": "",
  248. "Content-Type": "text/plain",
  249. "Host": "localhost:8000",
  250. "Connection": "keep-alive",
  251. "Cache-Control": "max-age=0",
  252. "Upgrade-Insecure-Requests": "1",
  253. "User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36",
  254. "Sec-Fetch-User": "?1",
  255. "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3",
  256. "Sec-Fetch-Site": "none",
  257. "Sec-Fetch-Mode": "navigate",
  258. "Accept-Encoding": "gzip, deflate, br",
  259. "Accept-Language": "en-US,en;q=0.9",
  260. "Cookie": "",
  261. "Dnt": "1"
  262. },
  263. "data": {}
  264. },
  265. "server_name": "81bf6d47de7c",
  266. "sdk": {
  267. "name": "sentry.python",
  268. "version": "0.13.5",
  269. "packages": [{ "name": "pypi:sentry-sdk", "version": "0.13.5" }],
  270. "integrations": [
  271. "argv",
  272. "atexit",
  273. "dedupe",
  274. "django",
  275. "excepthook",
  276. "logging",
  277. "modules",
  278. "stdlib",
  279. "threading"
  280. ]
  281. },
  282. "platform": "python",
  283. "_meta": {
  284. "request": {
  285. "headers": { "Cookie": { "": { "rem": [["!config", "x", 0, 221]] } } }
  286. }
  287. }
  288. }