lib/new_relic/agent/instrumentation/memcache/dalli.rb in newrelic_rpm-4.4.0.336 vs lib/new_relic/agent/instrumentation/memcache/dalli.rb in newrelic_rpm-4.5.0.337
- old
+ new
@@ -66,11 +66,11 @@
send_multiget_without_newrelic_trace(keys)
ensure
if ::NewRelic::Agent.config[:capture_memcache_keys]
segment.notice_nosql_statement "#{SEND_MULTIGET_METRIC_NAME} #{keys.inspect}"
end
- segment.finish
+ segment.finish if segment
end
end
end
end
@@ -84,10 +84,10 @@
define_method method_name do |*args, &block|
segment = NewRelic::Agent::Transaction.start_segment "Ruby/Memcached/Dalli/#{method_name}"
begin
__send__ method_name_without, *args, &block
ensure
- segment.finish
+ segment.finish if segment
end
end
__send__ visibility, method_name
__send__ visibility, method_name_without