Module: Raven::ActiveSupportBreadcrumbs

Defined in:
lib/raven/breadcrumbs/activesupport.rb

Class Method Summary collapse

Class Method Details

.add(name, started, _finished, _unique_id, data) ⇒ Object


4
5
6
7
8
9
10
# File 'lib/raven/breadcrumbs/activesupport.rb', line 4

def add(name, started, _finished, _unique_id, data)
  Raven.breadcrumbs.record do |crumb|
    crumb.data = data
    crumb.category = name
    crumb.timestamp = started.to_i
  end
end

.injectObject


12
13
14
15
16
# File 'lib/raven/breadcrumbs/activesupport.rb', line 12

def inject
  ActiveSupport::Notifications.subscribe(/.*/) do |name, started, finished, unique_id, data|
    add(name, started, finished, unique_id, data)
  end
end