class Object
Public Instance Methods
query_with_newrelic_trace(query, &blk)
click to toggle source
# File lib/new_relic/presto/instrumentation.rb, line 17 def query_with_newrelic_trace(query, &blk) callback = proc do |_result, scoped_metric, elapsed| NewRelic::Agent::Datastores.notice_sql(query, scoped_metric, elapsed) end NewRelic::Agent::Datastores.wrap('Presto', 'query', nil, callback) do query_without_newrelic_trace(query, &blk) end end
run_with_newrelic_trace(query)
click to toggle source
# File lib/new_relic/presto/instrumentation.rb, line 29 def run_with_newrelic_trace(query) callback = proc do |_result, scoped_metric, elapsed| NewRelic::Agent::Datastores.notice_sql(query, scoped_metric, elapsed) end NewRelic::Agent::Datastores.wrap('Presto', 'run', nil, callback) do run_without_newrelic_trace(query) end end