lib/heroku_metal.rb in oboe-heroku-0.9.8.5 vs lib/heroku_metal.rb in oboe-heroku-0.9.9.0
- old
+ new
@@ -48,13 +48,13 @@
Oboe.logger.debug "[oboe/debug] Initializing Heroku based reporter."
# The Oboe Reporter is configured via Heroku config variables.
Oboe.reporter = Oboe::Reporter.new(nil, nil)
+
+ Oboe::API.report_init
- Oboe::API.report_init('rack') unless ["development", "test"].include? ENV['RACK_ENV']
-
rescue Exception => e
$stderr.puts e.message
raise
end
end
@@ -119,14 +119,15 @@
# Disconnect/Reconnect wrappers used for forking webservers
# such as Unicorn or Passenger
#
def disconnect!
- ::Oboe::Context.disconnect(::Oboe.reporter) if Oboe.loaded
+ # To avoid an issue with SSL reconnects, delay Reporter initialization
+ # until after the fork is completed. Here, do nothing for now.
end
def reconnect!
- ::Oboe::Context.reconnect(::Oboe.reporter) if Oboe.loaded
+ Oboe::Reporter.start
end
end
end
Oboe.loaded = true