Method: NewRelic::Agent::ErrorTraceAggregator#over_queue_limit?

Defined in:
lib/new_relic/agent/error_trace_aggregator.rb

#over_queue_limit?(message) ⇒ Boolean

checks the size of the error queue to make sure we are under the maximum limit, and logs a warning if we are over the limit.

Returns:

  • (Boolean)
[View source]

57
58
59
60
61
62
63
# File 'lib/new_relic/agent/error_trace_aggregator.rb', line 57

def over_queue_limit?(message)
  over_limit = (@errors.count { |err| !err.is_internal } >= @capacity)
  if over_limit
    ::NewRelic::Agent.logger.warn("The error reporting queue has reached #{@capacity}. The error detail for this and subsequent errors will not be transmitted to New Relic until the queued errors have been sent: #{message}")
  end
  over_limit
end