solved-n-plus-one-in-django-index-view.json 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202
  1. {
  2. "event_id": "4e7c82a05f514c93b6101d255ca14f89",
  3. "datetime": "2022-08-31T14:59:32.566927+00:00",
  4. "culprit": "/books/",
  5. "location": "/books/",
  6. "spans": [
  7. {
  8. "timestamp": 1661957972.566523,
  9. "start_timestamp": 1661957970.378754,
  10. "exclusive_time": 0.157118,
  11. "description": "django.middleware.security.SecurityMiddleware.__call__",
  12. "op": "django.middleware",
  13. "span_id": "b35fe8bfc034fe6d",
  14. "parent_span_id": "8c9cfb04076db458",
  15. "trace_id": "679ca2e3ce344d689f7b42b0e8fb32a4",
  16. "tags": {
  17. "django.function_name": "django.utils.deprecation.MiddlewareMixin.__call__",
  18. "django.middleware_name": "django.middleware.security.SecurityMiddleware"
  19. },
  20. "hash": "0f43fb6f6e01ca52",
  21. "same_process_as_parent": true
  22. },
  23. {
  24. "timestamp": 1661957972.566464,
  25. "start_timestamp": 1661957970.378852,
  26. "exclusive_time": 2.594948,
  27. "description": "django.contrib.sessions.middleware.SessionMiddleware.__call__",
  28. "op": "django.middleware",
  29. "span_id": "b4cc10cfb5bb0d0b",
  30. "parent_span_id": "b35fe8bfc034fe6d",
  31. "trace_id": "679ca2e3ce344d689f7b42b0e8fb32a4",
  32. "tags": {
  33. "django.function_name": "django.utils.deprecation.MiddlewareMixin.__call__",
  34. "django.middleware_name": "django.contrib.sessions.middleware.SessionMiddleware"
  35. },
  36. "hash": "3dc5dd68b38e1730",
  37. "same_process_as_parent": true
  38. },
  39. {
  40. "timestamp": 1661957972.566396,
  41. "start_timestamp": 1661957970.381379,
  42. "exclusive_time": 1.232147,
  43. "description": "django.middleware.common.CommonMiddleware.__call__",
  44. "op": "django.middleware",
  45. "span_id": "84b7b23061a36e25",
  46. "parent_span_id": "b4cc10cfb5bb0d0b",
  47. "trace_id": "679ca2e3ce344d689f7b42b0e8fb32a4",
  48. "tags": {
  49. "django.function_name": "django.utils.deprecation.MiddlewareMixin.__call__",
  50. "django.middleware_name": "django.middleware.common.CommonMiddleware"
  51. },
  52. "hash": "424c6ae1641f0f0e",
  53. "same_process_as_parent": true
  54. },
  55. {
  56. "timestamp": 1661957972.56635,
  57. "start_timestamp": 1661957970.382565,
  58. "exclusive_time": 0.113011,
  59. "description": "django.middleware.csrf.CsrfViewMiddleware.__call__",
  60. "op": "django.middleware",
  61. "span_id": "b6af0fe580697876",
  62. "parent_span_id": "84b7b23061a36e25",
  63. "trace_id": "679ca2e3ce344d689f7b42b0e8fb32a4",
  64. "tags": {
  65. "django.function_name": "django.utils.deprecation.MiddlewareMixin.__call__",
  66. "django.middleware_name": "django.middleware.csrf.CsrfViewMiddleware"
  67. },
  68. "hash": "d5da18d7274b34a1",
  69. "same_process_as_parent": true
  70. },
  71. {
  72. "timestamp": 1661957972.566328,
  73. "start_timestamp": 1661957970.382656,
  74. "exclusive_time": 0.110864,
  75. "description": "django.contrib.auth.middleware.AuthenticationMiddleware.__call__",
  76. "op": "django.middleware",
  77. "span_id": "ad32d8a49d273bdc",
  78. "parent_span_id": "b6af0fe580697876",
  79. "trace_id": "679ca2e3ce344d689f7b42b0e8fb32a4",
  80. "tags": {
  81. "django.function_name": "django.utils.deprecation.MiddlewareMixin.__call__",
  82. "django.middleware_name": "django.contrib.auth.middleware.AuthenticationMiddleware"
  83. },
  84. "hash": "ac72fc0a4f5fe381",
  85. "same_process_as_parent": true
  86. },
  87. {
  88. "timestamp": 1661957972.566309,
  89. "start_timestamp": 1661957970.382748,
  90. "exclusive_time": 9.091139,
  91. "description": "django.contrib.messages.middleware.MessageMiddleware.__call__",
  92. "op": "django.middleware",
  93. "span_id": "ac6091f22d9366a3",
  94. "parent_span_id": "ad32d8a49d273bdc",
  95. "trace_id": "679ca2e3ce344d689f7b42b0e8fb32a4",
  96. "tags": {
  97. "django.function_name": "django.utils.deprecation.MiddlewareMixin.__call__",
  98. "django.middleware_name": "django.contrib.messages.middleware.MessageMiddleware"
  99. },
  100. "hash": "ac1468d8e11a0553",
  101. "same_process_as_parent": true
  102. },
  103. {
  104. "timestamp": 1661957972.566258,
  105. "start_timestamp": 1661957970.391788,
  106. "exclusive_time": 0.916005,
  107. "description": "django.middleware.clickjacking.XFrameOptionsMiddleware.__call__",
  108. "op": "django.middleware",
  109. "span_id": "98f79ffd92d4a060",
  110. "parent_span_id": "ac6091f22d9366a3",
  111. "trace_id": "679ca2e3ce344d689f7b42b0e8fb32a4",
  112. "tags": {
  113. "django.function_name": "django.utils.deprecation.MiddlewareMixin.__call__",
  114. "django.middleware_name": "django.middleware.clickjacking.XFrameOptionsMiddleware"
  115. },
  116. "hash": "d8681423cab4275f",
  117. "same_process_as_parent": true
  118. },
  119. {
  120. "timestamp": 1661957970.392034,
  121. "start_timestamp": 1661957970.392019,
  122. "exclusive_time": 0.01502,
  123. "description": "django.middleware.csrf.CsrfViewMiddleware.process_view",
  124. "op": "django.middleware",
  125. "span_id": "b455d7ac30d3a0a0",
  126. "parent_span_id": "98f79ffd92d4a060",
  127. "trace_id": "679ca2e3ce344d689f7b42b0e8fb32a4",
  128. "tags": {
  129. "django.function_name": "django.middleware.csrf.CsrfViewMiddleware.process_view",
  130. "django.middleware_name": "django.middleware.csrf.CsrfViewMiddleware"
  131. },
  132. "hash": "e853d2eb7fb9ebb0",
  133. "same_process_as_parent": true
  134. },
  135. {
  136. "timestamp": 1661957972.565666,
  137. "start_timestamp": 1661957970.392127,
  138. "exclusive_time": 3.560066,
  139. "description": "index",
  140. "op": "django.view",
  141. "span_id": "975f73422c8b1592",
  142. "parent_span_id": "98f79ffd92d4a060",
  143. "trace_id": "679ca2e3ce344d689f7b42b0e8fb32a4",
  144. "hash": "6a992d5529f459a4",
  145. "same_process_as_parent": true
  146. },
  147. {
  148. "timestamp": 1661957972.244459,
  149. "start_timestamp": 1661957970.393029,
  150. "exclusive_time": 1520.380972,
  151. "description": "connect",
  152. "op": "db",
  153. "span_id": "9f31e1ee4ef94970",
  154. "parent_span_id": "975f73422c8b1592",
  155. "trace_id": "679ca2e3ce344d689f7b42b0e8fb32a4",
  156. "hash": "b640a0ce465fa2a4",
  157. "same_process_as_parent": true
  158. },
  159. {
  160. "timestamp": 1761957972.078148,
  161. "start_timestamp": 1661957971.911963,
  162. "exclusive_time": 166.184903,
  163. "description": "\n SELECT VERSION(),\n @@sql_mode,\n @@default_storage_engine,\n @@sql_auto_is_null,\n @@lower_case_table_names,\n CONVERT_TZ('2001-01-01 01:00:00', 'UTC', 'UTC') IS NOT NULL\n ",
  164. "op": "db",
  165. "span_id": "a05754d3fde2db29",
  166. "parent_span_id": "9f31e1ee4ef94970",
  167. "trace_id": "679ca2e3ce344d689f7b42b0e8fb32a4",
  168. "hash": "3a91b85ea92a26b9",
  169. "same_process_as_parent": true
  170. },
  171. {
  172. "timestamp": 1661957972.244184,
  173. "start_timestamp": 1661957972.07932,
  174. "exclusive_time": 164.864064,
  175. "description": "SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED",
  176. "op": "db",
  177. "span_id": "8ed794ef6fc2ca5d",
  178. "parent_span_id": "9f31e1ee4ef94970",
  179. "trace_id": "679ca2e3ce344d689f7b42b0e8fb32a4",
  180. "hash": "061710eb39a66089",
  181. "same_process_as_parent": true
  182. },
  183. {
  184. "timestamp": 1661957972.563516,
  185. "start_timestamp": 1661957972.244967,
  186. "exclusive_time": 318.548918,
  187. "description": "SELECT `books_book`.`id`, `books_book`.`title`, `books_book`.`author_id`, `books_author`.`id`, `books_author`.`name` FROM `books_book` INNER JOIN `books_author` ON (`books_book`.`author_id` = `books_author`.`id`) LIMIT 10",
  188. "op": "db",
  189. "span_id": "85dc61f6b5fbfa2b",
  190. "parent_span_id": "975f73422c8b1592",
  191. "trace_id": "679ca2e3ce344d689f7b42b0e8fb32a4",
  192. "hash": "e5aa87dbfacc0120",
  193. "same_process_as_parent": true
  194. }
  195. ],
  196. "start_timestamp": 1661957970.376365,
  197. "timestamp": 1661957972.566927,
  198. "title": "/books/",
  199. "transaction": "/books/",
  200. "transaction_info": {"source": "route"},
  201. "type": "transaction"
  202. }