{"repo":"kirillshevch/query_track","free":true,"listed":false,"github":"https://github.com/kirillshevch/query_track","clone":"git clone https://github.com/kirillshevch/query_track.git","description":"Find time-consuming database queries for ActiveRecord-based Rails Apps","language":"Ruby","stars":304,"topics":["rails","database","performance","slack","query-optimization","development-tools"],"license":"MIT","category":"databases-storage","readme_excerpt":"QueryTrack Tool for finding time-consuming database queries for ActiveRecord-based Rails Apps. Provides Slack notifications with backtrace, raw SQL, time duration, etc. Installation Add this line to your application's Gemfile and then execute bundle install : Usage SQL Duration Limit Specify SQL duration query limit (in seconds): Console Log Enable console logs from config: Filters To avoid noisy warnings from used gems, and places where fat queries are justified, you can filters SQL by backtrace. For example, you have installed activeadmin and want to skip everything from app/admin : App Directory QueryTrack finds the trace by filtering the caller by the app directory. By default, the app directory is set to 'app', the default for Rails apps. For apps that have a non-stanard app directory, this can be set with the app dir config field: Enable/Disable toggle Enable/disable with ENV variables to turn it on/off without code push. By default QueryTrack is enabled. Slack Notifications To receive notifications about slow queries into Slack, you need to install incoming-webhooks and put link into config file: Custom Notifications (Handlers) You can write your own handler for slow queries. Send data to any source(for e.g. to logs storage) or make notification for another source(Email, Messengers, etc.) Production Usage Notes When QueryTrack send slack hooks, request is executed in separate thread. So there should be no synchronous delays. Subscription to SQL events and checking dura","default_branch":null,"files":null,"tree":[],"storefront":"/r/kirillshevch","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/kirillshevch/query_track/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}