Skip to content

AO3-7471 Remove active_record_query_trace, replace w/native - #5975

Open
y7nieSEl5 wants to merge 2 commits into
otwcode:masterfrom
y7nieSEl5:AO3-7471
Open

AO3-7471 Remove active_record_query_trace, replace w/native#5975
y7nieSEl5 wants to merge 2 commits into
otwcode:masterfrom
y7nieSEl5:AO3-7471

Conversation

@y7nieSEl5

@y7nieSEl5 y7nieSEl5 commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Pull Request Checklist

Issue

https://otwarchive.atlassian.net/browse/AO3-7471

Purpose

Removes the overlapping query-source tracing mechanisms and relies on Rails' native verbose query logs.

  • removes the active_record_query_trace dependency
  • removes the gem-specific initializer
  • removes the custom ActiveRecord::LogSubscriber extension
  • keeps config.active_record.verbose_query_logs = true in development

Development query logs now contain one native ↳ file:line entry instead of duplicate source information or a multiline gem-generated stack trace.

Testing Instructions

  1. Rebuild and start the development container:
docker compose up -d --build web

Confirm its dependencies are installed:

docker compose exec web bundle check
  1. Trigger a database query:
docker compose exec web bin/rails runner 'User.first'
  1. Inspect the development log:
docker compose exec web tail -n 30 log/development.log

Confirm query entries contain a single Rails-native ↳ file:line source and do not contain multiline active_record_query_trace call stacks or duplicate source lines.

Credit

y7nieSEl5, she/her

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant