Permalink
Browse files

Fix net instrumentation for corner case

  • Loading branch information...
bkayser committed Nov 19, 2009
1 parent ae86564 commit 970aa2821977372819b1e4ee5a8afe4a51ce0f16
Showing with 7 additions and 6 deletions.
  1. +3 −0 CHANGELOG
  2. +3 −5 lib/new_relic/agent/instrumentation/net.rb
  3. +1 −1 lib/new_relic/version.rb
View
@@ -1,3 +1,6 @@
+v2.9.8.
+ * Fix bug in Net instrumentation when a block is passed to request calls.
+
v2.9.7.
* Fix External instrumentation so it does not capture Net
calls outside of web transactions.
@@ -1,17 +1,15 @@
-# ActiveMerchant Instrumentation.
-
if defined? Net::HTTP
Net::HTTP.class_eval do
- def request_with_newrelic_trace(*args)
+ def request_with_newrelic_trace(*args, &block)
if Thread::current[:newrelic_scope_stack].nil?
- request_without_newrelic_trace(*args)
+ request_without_newrelic_trace(*args, &block)
else
self.class.trace_method_execution_with_scope("External/#{@address}/Net::HTTP/#{args[0].method}",
true,
true) do
self.class.trace_method_execution_no_scope("External/#{@address}/all") do
self.class.trace_method_execution_no_scope("External/allWeb") do
- request_without_newrelic_trace(*args)
+ request_without_newrelic_trace(*args, &block)
end
end
end
View
@@ -3,7 +3,7 @@ module NewRelic
module VERSION #:nodoc:
MAJOR = 2
MINOR = 9
- TINY = 7
+ TINY = 8
STRING = [MAJOR, MINOR, TINY].join('.')
end

0 comments on commit 970aa28

Please sign in to comment.