lib/new_relic/agent/datastores.rb in newrelic_rpm-8.13.1 vs lib/new_relic/agent/datastores.rb in newrelic_rpm-8.14.0
- old
+ new
@@ -51,11 +51,11 @@
operation: operation
)
begin
send(method_name_without_newrelic, *args, &blk)
ensure
- segment.finish if segment
+ ::NewRelic::Agent::Transaction::Segment.finish(segment)
end
end
send(visibility, method_name)
send(visibility, method_name_without_newrelic)
@@ -124,10 +124,10 @@
if callback
elapsed_time = Process.clock_gettime(Process::CLOCK_REALTIME) - segment.start_time
callback.call(result, segment.name, elapsed_time)
end
ensure
- segment.finish if segment
+ ::NewRelic::Agent::Transaction::Segment.finish(segment)
end
end
end
# @!group Capturing query / statement text