Method: NewRelic::Agent#disable_all_tracing

Defined in:
lib/new_relic/agent.rb

#disable_all_tracingObject

Yield to the block without collecting any metrics or traces in any of the subsequent calls. If executed recursively, will keep track of the first entry point and turn on tracing again after leaving that block. This uses the thread local Tracer::State.


495
496
497
498
499
500
501
502
503
504
505
506
# File 'lib/new_relic/agent.rb', line 495

def disable_all_tracing
  record_api_supportability_metric(:disable_all_tracing)

  return yield unless agent

  begin
    agent.push_trace_execution_flag(false)
    yield
  ensure
    agent.pop_trace_execution_flag
  end
end