Method: NewRelic::Agent::Instrumentation::ActiveSupportLogger#broadcast_with_tracing

Defined in:
lib/new_relic/agent/instrumentation/active_support_logger/instrumentation.rb

#broadcast_with_tracing(logger) ⇒ Object

Mark @skip_instrumenting on any broadcasted loggers to instrument Rails.logger only

[View source]

12
13
14
15
16
17
18
19
20
# File 'lib/new_relic/agent/instrumentation/active_support_logger/instrumentation.rb', line 12

def broadcast_with_tracing(logger)
  NewRelic::Agent.record_instrumentation_invocation(INSTRUMENTATION_NAME)

  NewRelic::Agent::Instrumentation::Logger.mark_skip_instrumenting(logger)
  yield
rescue => error
  NewRelic::Agent.notice_error(error)
  raise
end