Module: NewRelic::Agent::Instrumentation::ActiveSupportBroadcastLogger

Included in:
ActiveSupportBroadcastLogger::Prepend
Defined in:
lib/new_relic/agent/instrumentation/active_support_broadcast_logger/instrumentation.rb

Defined Under Namespace

Modules: Chain, Prepend

Instance Method Summary collapse

Instance Method Details

#record_one_broadcast_with_new_relic(*args) ⇒ Object



7
8
9
10
11
12
13
14
15
# File 'lib/new_relic/agent/instrumentation/active_support_broadcast_logger/instrumentation.rb', line 7

def record_one_broadcast_with_new_relic(*args)
  if broadcasts && broadcasts[1..-1]
    broadcasts[1..-1].each { |broadcasted_logger| broadcasted_logger.instance_variable_set(:@skip_instrumenting, true) }
    yield
    broadcasts.each { |broadcasted_logger| broadcasted_logger.instance_variable_set(:@skip_instrumenting, false) }
  else
    NewRelic::Agent.logger.error('Error recording broadcasted logger')
  end
end