lib/oboe/config.rb in oboe-2.6.6.1 vs lib/oboe/config.rb in oboe-2.6.7.1

- old
+ new

@@ -10,11 +10,11 @@ # module Config @@config = {} @@instrumentation = [ :cassandra, :dalli, :nethttp, :memcached, :memcache, :mongo, - :moped, :rack, :redis, :resque, :action_controller, :action_view, + :moped, :rack, :redis, :resque, :action_controller, :action_view, :active_record ] ## # Return the raw nested hash. # @@ -46,11 +46,11 @@ Oboe::Config[:resque][:collect_backtraces] = true # Special instrument specific flags # # :link_workers - associates enqueue operations with the jobs they queue by piggybacking - # an additional argument that is stripped prior to job proecessing + # an additional argument that is stripped prior to job proecessing # !!Note: Make sure both the queue side and the Resque workers are instrumented # or jobs will fail # (Default: false) @@config[:resque][:link_workers] = false @@ -74,11 +74,11 @@ # The default configuration @@config[:tracing_mode] = "through" @@config[:reporter_host] = "127.0.0.1" @@config[:reporter_port] = "7831" end - + @@config[:verbose] = false end def self.update!(data) data.each do |key, value| @@ -101,20 +101,20 @@ Oboe.logger.warn "WARNING: :sampling_rate is not a supported setting for Oboe::Config. Please use :sample_rate." end if key == :sample_rate unless value.is_a?(Integer) or value.is_a?(Float) - raise "oboe :sample_rate must be a number between 1 and 1000000 (1m)" + raise "oboe :sample_rate must be a number between 1 and 1000000 (1m)" end - + # Validate :sample_rate value unless value.between?(1, 1e6) - raise "oboe :sample_rate must be between 1 and 1000000 (1m)" + raise "oboe :sample_rate must be between 1 and 1000000 (1m)" end # Assure value is an integer @@config[key.to_sym] = value.to_i - + Oboe.set_sample_rate(value) end # Update liboboe if updating :tracing_mode if key == :tracing_mode