lib/instana/base.rb in instana-1.0.2 vs lib/instana/base.rb in instana-1.0.3

- old
+ new

@@ -4,11 +4,11 @@ require "instana/helpers" module Instana class << self attr_accessor :agent - attr_accessor :collectors + attr_accessor :collector attr_accessor :tracer attr_accessor :processor attr_accessor :config attr_accessor :logger attr_accessor :pid @@ -18,17 +18,14 @@ # # Setup the Instana language agent to an informal "ready # to run" state. # def setup - @logger = ::Instana::XLogger.new(STDOUT) - @logger.unknown "Stan is on the scene. Starting Instana instrumentation." - @agent = ::Instana::Agent.new @tracer = ::Instana::Tracer.new @processor = ::Instana::Processor.new - @collectors = [] + @collector = ::Instana::Collector.new end # Indicates whether we are running in a development environment. # # @return Boolean @@ -44,5 +41,9 @@ def test? ENV.key?('INSTANA_GEM_TEST') end end end + +# Setup the logger as early as possible +::Instana.logger = ::Instana::XLogger.new(STDOUT) +::Instana.logger.unknown "Stan is on the scene. Starting Instana instrumentation."