class Datadog::Tracing::Contrib::ActiveSupport::Notifications::Subscription::Callbacks
Wrapper for subscription callbacks
def add(key, &block)
def add(key, &block) blocks_for(key) << block if block end
def blocks_for(key)
def blocks_for(key) blocks[key] ||= [] end
def initialize
def initialize @blocks = {} end
def run(event, key, *args)
def run(event, key, *args) blocks_for(key).each do |callback| begin callback.call(event, key, *args) rescue StandardError => e Datadog.logger.debug( "ActiveSupport::Notifications '#{key}' callback for '#{event}' failed: #{e.class.name} #{e.message}" ) end end end