lib/joboe_metal.rb in oboe-2.4.0.1 vs lib/joboe_metal.rb in oboe-2.5.0.7

- old
+ new

@@ -79,10 +79,14 @@ Oboe.reporter = Oboe::FileReporter.new("/tmp/trace_output.bson") else Oboe.reporter = Oboe::UdpReporter.new(Oboe::Config[:reporter_host]) end - Oboe::API.report_init('rack') unless ["development", "test"].include? ENV['RACK_ENV'] + # Only report __Init from here if we are not instrumenting a framework. + # Otherwise, frameworks will handle reporting __Init after full initialization + unless defined?(::Rails) or defined?(::Sinatra) or defined?(::Padrino) + Oboe::API.report_init('rack') unless ["development", "test"].include? ENV['RACK_ENV'] + end rescue Exception => e $stderr.puts e.message raise end