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.



741
742
743
744
745
746
747
748
749
750
751
752
# File 'lib/new_relic/agent.rb', line 741

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