# brunofacca/active-record-query-trace

Rails plugin that logs/displays a backtrace of all SQL queries executed by Active Record

Repository: https://github.com/brunofacca/active-record-query-trace
Canonical: https://ross.abutalabs.com/products/active-record-query-trace
Language: Ruby
License: MIT
License Family: permissive
Topics: ruby, ruby-on-rails, backtrace, activerecord
Last push: 2026-01-20T23:44:19+00:00

## Health v2 (maintenance only)
Score: 61/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 63, release rhythm 35, longevity 100
- inputs: {"age_days": 5558, "days_push": 225, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1008, forks 74 (observed 2026-08-28T04:03:12.712512+00:00)

## What it is
A Rails plugin that logs a backtrace for every SQL query executed by Active Record in the development console and log. It helps developers locate where queries originate in their application code.

## Use cases
- find where a SQL query is executed in a Rails app
- track down N+1 queries during development
- optimize database performance in a large Rails codebase
- debug which view or model triggers slow queries
- filter query traces to application code only

## When to choose
- you develop Rails apps with Active Record and need query origin tracing
- you are profiling or optimizing database access in development
- you need to locate queries buried in views, decorators, or concerns

## When to avoid
- you need production query monitoring or APM (use tools like Skylight or New Relic)
- your project does not use Ruby on Rails or Active Record
- you need query performance metrics rather than backtraces

## Facets
- artifact type: plugin
- maturity: active
- function: logging, database, developer-tools, monitoring
- domain: web-development, databases, developer-tools, performance
- platform: ruby
- tags: rails-plugin, activerecord, sql-backtrace, debugging, n-plus-one, web-server

## Member repositories
- brunofacca/active-record-query-trace (main) score 61

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:12.712512+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T07:12:08.508041+00:00, confidence not recorded.
  - readme: https://github.com/brunofacca/active-record-query-trace (fetched 2026-08-28T04:03:12.712512+00:00, sha 26e894a84dfc)
- Data as of 2026-08-30T08:39:29.467469+00:00.
