lib/oboe/loading.rb in oboe-2.5.0.7 vs lib/oboe/loading.rb in oboe-2.6.0.2

- old
+ new

@@ -35,16 +35,10 @@ # Actual initialization is often separated out as it can be dependent on on the state # of the stack boot process. e.g. code requiring that initializers, frameworks or # instrumented libraries are already loaded... # module Loading - def self.setup_logger - if defined?(::Rails) and ::Rails.logger - Oboe.logger = ::Rails.logger - end - end - ## # Load the TraceView access key (either from system configuration file # or environment variable) and calculate internal RUM ID # def self.load_access_key @@ -53,11 +47,11 @@ # Preferably get access key from environment (e.g. Heroku) Oboe::Config[:access_key] = ENV['TRACEVIEW_CUUID'] Oboe::Config[:rum_id] = Oboe::Util::Base64URL.encode(Digest::SHA1.digest("RUM" + Oboe::Config[:access_key])) else # ..else read from system-wide configuration file - unless Oboe::Config.access_key + if Oboe::Config.access_key.empty? config_file = '/etc/tracelytics.conf' return unless File.exists?(config_file) File.open(config_file).each do |line| if line =~ /^tracelyzer.access_key=/ or line =~ /^access_key/ @@ -88,27 +82,11 @@ Oboe::API.extend_with_tracing rescue LoadError => e Oboe.logger.fatal "[oboe/error] Couldn't load oboe api." end end - - ## - # Load instrumentation for the various frameworks located in - # lib/oboe/frameworks/*/*.rb - # - def self.load_framework_instrumentation - pattern = File.join(File.dirname(__FILE__), 'frameworks/*/', '*.rb') - Dir.glob(pattern) do |f| - begin - require f - rescue => e - Oboe.logger.error "[oboe/loading] Error loading framework file '#{f}' : #{e}" - end - end - end end end Oboe::Loading.require_api -Oboe::Loading.load_framework_instrumentation Oboe::Reporter.start