Method: NewRelic::Agent::SqlSampler#should_add_trace?

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

#should_add_trace?(sql_item) ⇒ Boolean

this should always be called under the @samples_lock

Returns:

  • (Boolean)
[View source]

108
109
110
111
112
# File 'lib/new_relic/agent/sql_sampler.rb', line 108

def should_add_trace?(sql_item)
  @sql_traces.any? do |(_, existing_trace)|
    existing_trace.max_call_time < sql_item.duration
  end
end