Sha256: 7d9b74252709cbd201d085a1872c7ef1ba6beb5425c96efd7c4c78c89e9f0566

Contents?: true

Size: 1.12 KB

Versions: 17

Compression:

Stored size: 1.12 KB

Contents

require "instana/version"
require 'instana/logger'
require "instana/util"
require "instana/helpers"

module Instana
  class << self
    attr_accessor :agent
    attr_accessor :collector
    attr_accessor :tracer
    attr_accessor :processor
    attr_accessor :config
    attr_accessor :logger
    attr_accessor :pid

    ##
    # setup
    #
    # Setup the Instana language agent to an informal "ready
    # to run" state.
    #
    def setup
      @agent  = ::Instana::Agent.new
      @tracer = ::Instana::Tracer.new
      @processor = ::Instana::Processor.new
      @collector = ::Instana::Collector.new
    end

    # Indicates whether we are running in a development environment.
    #
    # @return Boolean
    #
    def debug?
      ENV.key?('INSTANA_GEM_DEV')
    end

    # Indicates whether we are running in the test environment.
    #
    # @return Boolean
    #
    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.info "Stan is on the scene.  Starting Instana instrumentation version #{::Instana::VERSION}"

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
instana-1.9.5 lib/instana/base.rb
instana-1.9.4 lib/instana/base.rb
instana-1.9.3 lib/instana/base.rb
instana-1.9.2 lib/instana/base.rb
instana-1.9.1 lib/instana/base.rb
instana-1.9.0 lib/instana/base.rb
instana-1.9.0.daftrabbit lib/instana/base.rb
instana-1.8.3 lib/instana/base.rb
instana-1.9.0.sillyrabbit lib/instana/base.rb
instana-1.8.2 lib/instana/base.rb
instana-1.8.1 lib/instana/base.rb
instana-1.8.0 lib/instana/base.rb
instana-1.7.15 lib/instana/base.rb
instana-1.7.14 lib/instana/base.rb
instana-1.7.14a lib/instana/base.rb
instana-1.7.13 lib/instana/base.rb
instana-1.7.12 lib/instana/base.rb