lib/oboe/config.rb in oboe-2.6.3.0 vs lib/oboe/config.rb in oboe-2.6.4.1

- old
+ new

@@ -63,12 +63,21 @@ # The oboe Ruby client has the ability to sanitize query literals # from SQL statements. By default this is disabled. Enable to # avoid collecting and reporting query literals to TraceView. @@config[:sanitize_sql] = false - # The default configuration - @@config[:tracing_mode] = "through" - @@config[:reporter_host] = "127.0.0.1" + if ENV.has_key?('OPENSHIFT_TRACEVIEW_TLYZER_IP') + # We're running on OpenShift + @@config[:tracing_mode] = "always" + @@config[:reporter_host] = ENV['OPENSHIFT_TRACEVIEW_TLYZER_IP'] + @@config[:reporter_port] = ENV['OPENSHIFT_TRACEVIEW_TLYZER_PORT'] + else + # 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|