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
Fixesrails#46103 and some things I found along the way.
The major changes:
- Explicitly show how to enable the functionality
- Add missing namespaced_controller default tag
- Remove mention of ActiveSupport::ExecutionContext since that is nodoc'ed internal API since commit 6bad959, instead show the ActiveSupport::CurrentAttributes example of a current account
- Mention the SQLCommenter format
Also added a section in the 'Debugging Rails Applications' guide for discoverability.
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