Class: Honeybadger::ActiveRecordSubscriber

Inherits:
NotificationSubscriber show all
Defined in:
lib/honeybadger/notification_subscriber.rb

Instance Method Summary collapse

Methods inherited from NotificationSubscriber

#finish, #record, #record_metrics, #start

Methods included from InstrumentationHelper

#decrement_counter, #extract_attributes, #extract_callable, #gauge, #histogram, #increment_counter, #metric_agent, #metric_attributes, #metric_instrumentation, #metric_source, #monotonic_timer, #time

Instance Method Details

#format_payload(payload) ⇒ Object



110
111
112
113
114
115
# File 'lib/honeybadger/notification_subscriber.rb', line 110

def format_payload(payload)
  {
    query: Util::SQL.obfuscate(payload[:sql], payload[:connection]&.adapter_name),
    async: payload[:async]
  }
end

#process?(event, payload) ⇒ Boolean

Returns:

  • (Boolean)


117
118
119
120
# File 'lib/honeybadger/notification_subscriber.rb', line 117

def process?(event, payload)
  return false if payload[:name] == "SCHEMA"
  true
end