Last active
October 2, 2020 16:33
-
-
Save ngelx/5051f14633a565526d6be7adaa3a4a41 to your computer and use it in GitHub Desktop.
Revisions
-
ngelx revised this gist
Oct 2, 2020 . 1 changed file with 4 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,8 @@ # config/initializer/query_track.rb # query_track: https://github.com/kirillshevch/query_track # rollbar: https://docs.rollbar.com/docs/rails QueryTrack::Settings.configure do |config| config.duration = 1 # in seconds -
ngelx created this gist
Oct 2, 2020 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,10 @@ # config/initializer/query_track.rb QueryTrack::Settings.configure do |config| config.duration = 1 # in seconds config.notifications.custom_handler = lambda do |sql, duration, trace| e = Exception.new("Slow SQL Query - #{trace}") e.set_backtrace(trace) Rollbar.warn(e, duration: duration, sql: sql) end end