Sha256: 8096ed03918bc6fe7ebdef0b3d099b86da46c4515220e87e47a168200d5f99a7

Contents?: true

Size: 1.09 KB

Versions: 34

Compression:

Stored size: 1.09 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.unknown "Stan is on the scene.  Starting Instana instrumentation."

Version data entries

34 entries across 34 versions & 1 rubygems

Version Path
instana-1.7.11 lib/instana/base.rb
instana-1.7.10 lib/instana/base.rb
instana-1.7.9 lib/instana/base.rb
instana-1.7.8 lib/instana/base.rb
instana-1.7.7 lib/instana/base.rb
instana-1.7.6 lib/instana/base.rb
instana-1.7.5 lib/instana/base.rb
instana-1.7.4 lib/instana/base.rb
instana-1.7.3 lib/instana/base.rb
instana-1.7.2 lib/instana/base.rb
instana-1.7.1 lib/instana/base.rb
instana-1.7.0 lib/instana/base.rb
instana-1.6.1 lib/instana/base.rb
instana-1.6.0 lib/instana/base.rb
instana-1.5.2 lib/instana/base.rb
instana-1.5.1 lib/instana/base.rb
instana-1.5.0 lib/instana/base.rb
instana-1.4.11 lib/instana/base.rb
instana-1.4.9 lib/instana/base.rb
instana-1.4.8 lib/instana/base.rb