module Locomotive::Wagon::InstrumentationConcern
Public Instance Methods
instrument(action, payload = {})
click to toggle source
# File lib/locomotive/wagon/commands/concerns/instrumentation_concern.rb, line 5 def instrument(action, payload = {}) ActiveSupport::Notifications.instrument(instrument_scope_name(action), payload) end
instrument_scope_name(action)
click to toggle source
# File lib/locomotive/wagon/commands/concerns/instrumentation_concern.rb, line 9 def instrument_scope_name(action) name = self.class.name[/::(\w+)Command$/, 1].underscore ['wagon', name, action.to_s].compact.join('.') end