lib/phobos/instrumentation.rb in phobos-1.1.0 vs lib/phobos/instrumentation.rb in phobos-1.2.0
- old
+ new
@@ -1,11 +1,11 @@
module Phobos
module Instrumentation
NAMESPACE = 'phobos'
def instrument(event, extra = {})
- ActiveSupport::Notifications.instrument("#{NAMESPACE}.#{event}", extra) do
- yield if block_given?
+ ActiveSupport::Notifications.instrument("#{NAMESPACE}.#{event}", extra) do |extra|
+ yield(extra) if block_given?
end
end
def self.subscribe(event)
ActiveSupport::Notifications.subscribe("#{NAMESPACE}.#{event}") do |*args|