You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: guides/source/debugging_rails_applications.md
+28-1Lines changed: 28 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -236,7 +236,34 @@ Below each database statement you can see arrows pointing to the specific source
236
236
237
237
Verbose query logs are enabled by default in the development environment logs after Rails 5.2.
238
238
239
-
WARNING: We recommend against using this setting in production environments. It relies on Ruby's `Kernel#caller` method which tends to allocate a lot of memory in order to generate stacktraces of method calls.
239
+
WARNING: We recommend against using this setting in production environments. It relies on Ruby's `Kernel#caller` method which tends to allocate a lot of memory in order to generate stacktraces of method calls. Use query log tags (see below) instead.
240
+
241
+
SQL Query Comments
242
+
------------------
243
+
244
+
SQL statements can be commented with tags containing runtime information, such as the name of the controller or job, to
245
+
trace troublesome queries back to the area of the application that generated these statements. This is useful when you are
0 commit comments