Rails Daily: Query Logging Enhancement and Documentation Fixes
Rails merged a new feature allowing SQL queries to be passed to query log tags for better production debugging, along with minor documentation corrections.
Duration: PT1M21S
Transcript
Good morning, this is Rails Daily for February 3rd, 2026.
Two pull requests were merged yesterday in the Rails repository, both focused on ActiveRecord improvements.
Fatkodima merged "Pass sql query to query log tags," introducing a significant enhancement to Rails' query logging system. This change allows developers to pass SQL query strings to query log tags, making it easier to debug issues like why certain queries aren't hitting database replicas in production. The implementation modifies the ActiveRecord query logs module to accept SQL strings and can conditionally add more backtrace lines based on the query content. This provides a cleaner alternative to using ActiveSupport::Notifications subscriptions with custom logic.
Coderhs merged a documentation fix correcting a typo in the ActiveRecord changelog. The change was marked as CI-skip, indicating it was a minor documentation update.
Additionally, Ryuta Kamizono committed another typo correction, fixing "ineficiently" to "inefficiently" in the changelog.
What's next: The query logging enhancement should help Rails applications better debug database routing issues in production environments. Teams using database replicas may find this particularly useful for troubleshooting query distribution problems.
That's your Rails Daily update. We'll be back tomorrow with more Rails development activity.