lib/honeybadger/init/rails.rb in honeybadger-2.4.0 vs lib/honeybadger/init/rails.rb in honeybadger-2.4.1
- old
+ new
@@ -24,11 +24,11 @@
middleware.insert_before(Honeybadger::Rack::ErrorNotifier, Honeybadger::Rack::UserInformer, config) if config[:'user_informer.enabled']
middleware.insert_before(Honeybadger::Rack::ErrorNotifier, Honeybadger::Rack::UserFeedback, config) if config[:'feedback.enabled']
end
end
- if config.feature?(:traces) && config[:'traces.enabled']
+ if config.traces?
ActiveSupport::Notifications.subscribe('start_processing.action_controller') do |name, started, finished, id, data|
Trace.create(id)
end
ActiveSupport::Notifications.subscribe('sql.active_record') do |*args|
@@ -55,10 +55,10 @@
Trace.current.complete(event, payload)
end
end
end
- if config.feature?(:metrics) && config[:'metrics.enabled']
+ if config.metrics?
ActiveSupport::Notifications.subscribe('process_action.action_controller') do |*args|
event = ActiveSupport::Notifications::Event.new(*args)
status = event.payload[:exception] ? 500 : event.payload[:status]
Agent.timing("app.request.#{status}", event.duration)
end