Method: NewRelic::Agent#ignore_error_filter

Defined in:
lib/new_relic/agent.rb

#ignore_error_filter(&block) ⇒ Object

Set a filter to be applied to errors that the Ruby Agent will track. The block should evaluate to the exception to track (which could be different from the original exception) or nil to ignore this exception.

The block is yielded to with the exception to filter.

Return the new block or the existing filter Proc if no block is passed.



266
267
268
269
270
271
272
273
274
# File 'lib/new_relic/agent.rb', line 266

def ignore_error_filter(&block)
  record_api_supportability_metric(:ignore_error_filter)

  if block
    NewRelic::Agent::ErrorCollector.ignore_error_filter = block
  else
    NewRelic::Agent::ErrorCollector.ignore_error_filter
  end
end