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



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

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

#delete_all(*args, &blk) ⇒ Object



71
72
73
74
75
# File 'lib/new_relic/agent/instrumentation/active_record_prepend.rb', line 71

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

#destroy_all(*args, &blk) ⇒ Object



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

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

#pluck(*args, &blk) ⇒ Object



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

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

#update_all(*args, &blk) ⇒ Object



65
66
67
68
69
# File 'lib/new_relic/agent/instrumentation/active_record_prepend.rb', line 65

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