lib/heroku_metal.rb in oboe-heroku-0.9.17.8 vs lib/heroku_metal.rb in oboe-heroku-0.9.18.1

- old
+ new

@@ -31,11 +31,20 @@ raise end end def self.sendReport(evt) - Oboe.reporter.sendReport(evt) if Oboe.loaded + if Oboe.loaded + # In the case of the SSL reporter (Heroku) and forking + # webservers, we don't start the reporter until we need + # it. + if !Oboe.reporter + Oboe::Reporter.start + end + + Oboe.reporter.sendReport(evt) + end end end class Event def self.metadataString(evt) @@ -102,15 +111,20 @@ # Disconnect/Reconnect wrappers used for forking webservers # such as Unicorn or Passenger # def disconnect! - # To avoid an issue with SSL reconnects, delay Reporter initialization - # until after the fork is completed. Here, do nothing for now. + # Since we moved to delayed SSL reporter initialization for forking + # webservers with preload_app!, these ops now do nothing. + # We keep them here for users that already have these calls in + # their apps (before/after fork) and in case we want to use them again. end def reconnect! - Oboe::Reporter.start + # Since we moved to delayed SSL reporter initialization for forking + # webservers with preload_app!, these ops now do nothing. + # We keep them here for users that already have these calls in + # their apps (before/after fork) and in case we want to use them again. end end end Oboe.loaded = true