Module: NewRelic::Agent::Instrumentation::ActiveRecordPrepend::RelationExtensions

Defined in:
lib/new_relic/agent/instrumentation/active_record_prepend.rb

Instance Method Summary collapse

Instance Method Details

#calculate(*args, &blk) ⇒ Object



95
96
97
98
99
# File 'lib/new_relic/agent/instrumentation/active_record_prepend.rb', line 95

def calculate(*args, &blk)
  ::NewRelic::Agent.with_database_metric_name(newrelic_relation_collection_name, nil, ACTIVE_RECORD) do
    super
  end
end

#delete_all(*args, &blk) ⇒ Object



83
84
85
86
87
# File 'lib/new_relic/agent/instrumentation/active_record_prepend.rb', line 83

def delete_all(*args, &blk)
  ::NewRelic::Agent.with_database_metric_name(newrelic_relation_collection_name, nil, ACTIVE_RECORD) do
    super
  end
end

#destroy_all(*args, &blk) ⇒ Object



89
90
91
92
93
# File 'lib/new_relic/agent/instrumentation/active_record_prepend.rb', line 89

def destroy_all(*args, &blk)
  ::NewRelic::Agent.with_database_metric_name(newrelic_relation_collection_name, nil, ACTIVE_RECORD) do
    super
  end
end

#pluck(*args, &blk) ⇒ Object



101
102
103
104
105
# File 'lib/new_relic/agent/instrumentation/active_record_prepend.rb', line 101

def pluck(*args, &blk)
  ::NewRelic::Agent.with_database_metric_name(newrelic_relation_collection_name, nil, ACTIVE_RECORD) do
    super
  end
end

#update_all(*args, &blk) ⇒ Object



77
78
79
80
81
# File 'lib/new_relic/agent/instrumentation/active_record_prepend.rb', line 77

def update_all(*args, &blk)
  ::NewRelic::Agent.with_database_metric_name(newrelic_relation_collection_name, nil, ACTIVE_RECORD) do
    super
  end
end