Skip to content

Commit 6c1120a

Browse files
dizlvskipkayhil
andauthored
[ci skip] Add warning note to :source_location tag option (rails#55167)
* Add warning note to :source_location tag option `:source_location` adds significant overhead to each SQL query issued from Rails application. Whilst this behaviour has been noted in changelog, it is not noticeable when reading the official documentation on Rails application configuration. Co-authored-by: Hartley McGuire <[email protected]>
1 parent 21b7e14 commit 6c1120a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

guides/source/configuring.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1488,6 +1488,8 @@ Define an `Array` specifying the key/value tags to be inserted in an SQL comment
14881488
`[ :application, :controller, :action, :job ]`. The available tags are: `:application`, `:controller`,
14891489
`:namespaced_controller`, `:action`, `:job`, and `:source_location`.
14901490
1491+
WARNING: Calculating the `:source_location` of a query can be slow, so you should consider its impact if using it in a production environment.
1492+
14911493
#### `config.active_record.query_log_tags_format`
14921494
14931495
A `Symbol` specifying the formatter to use for tags. Valid values are `:sqlcommenter` and `:legacy`.

0 commit comments

Comments
 (0)