lib/new_relic/agent/datastores.rb in newrelic_rpm-4.6.0.338 vs lib/new_relic/agent/datastores.rb in newrelic_rpm-4.7.0.339

- old
+ new

@@ -45,11 +45,14 @@ visibility = NewRelic::Helper.instance_method_visibility(clazz, method_name) alias_method method_name_without_newrelic, method_name define_method(method_name) do |*args, &blk| - segment = NewRelic::Agent::Transaction.start_datastore_segment(product, operation) + segment = NewRelic::Agent::Transaction.start_datastore_segment( + product: product, + operation: operation + ) begin send(method_name_without_newrelic, *args, &blk) ensure segment.finish if segment end @@ -107,10 +110,14 @@ def self.wrap(product, operation, collection = nil, callback = nil) NewRelic::Agent.record_api_supportability_metric(:wrap) return yield unless operation - segment = NewRelic::Agent::Transaction.start_datastore_segment(product, operation, collection) + segment = NewRelic::Agent::Transaction.start_datastore_segment( + product: product, + operation: operation, + collection: collection + ) begin result = yield ensure if callback