Sha256: ece8d3eb79b0594f082d8407ac4eac3bab8cddccf8d42b1ce2b8ec39c704e545

Contents?: true

Size: 1.03 KB

Versions: 3

Compression:

Stored size: 1.03 KB

Contents

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

module Instana
  class << self
    attr_accessor :agent
    attr_accessor :collectors
    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
      @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 = []
    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

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
instana-1.0.2 lib/instana/base.rb
instana-1.0.1 lib/instana/base.rb
instana-0.15.0 lib/instana/base.rb