Find source of queries
(cherry picked from commit 458392ef0d334173f65eac41eb23345e3201a024)
Checklist
-
I have read the Contribution & Best practices Guide. -
My branch is up-to-date with the upstream master
branch. -
The tests pass locally with my changes.
Short description of what this resolves/which issues does this fix?:
- Rails logs are inherently ambiguous about the source of a specific query, adding unnecessary difficulty when debugging or performance profiling queries.
Changes proposed in this pull request:
- Add a log entry, after each ActiveRecord entry, showing the current stack line that triggered the query.