Skip to content

Commit

Permalink
fix: ignore transactions with the immediate keyword (#668)
Browse files Browse the repository at this point in the history
  • Loading branch information
stympy authored Feb 18, 2025
1 parent becbfd7 commit 43e9ccb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/honeybadger/breadcrumbs/active_support.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def self.default_notifications
exclude_when: lambda do |data|
# Ignore schema, begin, and commit transaction queries
data[:name] == "SCHEMA" ||
(data[:sql] && (Util::SQL.force_utf_8(data[:sql].dup) =~ /^(begin|commit)( transaction)?$/i))
(data[:sql] && (Util::SQL.force_utf_8(data[:sql].dup) =~ /^(begin|commit)( immediate)?( transaction)?$/i))
end
},

Expand Down
4 changes: 2 additions & 2 deletions lib/honeybadger/config/defaults.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ class Boolean; end
'Sidekiq::JobRetry::Skip'].map(&:freeze).freeze

IGNORE_EVENTS_DEFAULT = [
{ event_type: 'metric.hb', metric_name: 'duration.sql.active_record', query: /^(begin|commit)( transaction)?$/i },
{ event_type: 'sql.active_record', query: /^(begin|commit)( transaction)?$/i },
{ event_type: 'metric.hb', metric_name: 'duration.sql.active_record', query: /^(begin|commit)( immediate)?( transaction)?$/i },
{ event_type: 'sql.active_record', query: /^(begin|commit)( immediate)?( transaction)?$/i },
{ event_type: 'sql.active_record', query: /(solid_queue|good_job)/i },
{ event_type: 'sql.active_record', name: /^GoodJob/ },
{ event_type: 'process_action.action_controller', controller: 'Rails::HealthController' }
Expand Down

0 comments on commit 43e9ccb

Please sign in to comment.