Module: Locomotive::Wagon::InstrumentationConcern
- Included in:
- PullCommand, PushCommand, SyncCommand
- Defined in:
- lib/locomotive/wagon/commands/concerns/instrumentation_concern.rb
Instance Method Summary collapse
Instance Method Details
#instrument(action, payload = {}) ⇒ Object
5 6 7 |
# 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) ⇒ Object
9 10 11 12 |
# 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 |