Sha256: 9de31df37abe764a2e17ab6fa2190cad3d22a009aece66b76d10c3eee07a2afb

Contents?: true

Size: 1.93 KB

Versions: 10

Compression:

Stored size: 1.93 KB

Contents

# Copyright (c) 2013 AppNeta, Inc.
# All rights reserved.

# Backward compatibility for supported environment variables
ENV['TRACEVIEW_GEM_VERBOSE'] = ENV['OBOE_GEM_VERBOSE'] if ENV.key?('OBOE_GEM_VERBOSE')
ENV['TRACEVIEW_GEM_TEST']    = ENV['OBOE_GEM_TEST']    if ENV.key?('OBOE_GEM_TEST')

begin
  require 'traceview/version'
  require 'traceview/thread_local'
  require 'traceview/logger'
  require 'traceview/util'
  require 'traceview/xtrace'
  require 'traceview/support'

  # If OboeHeroku is already defined then we are in a PaaS environment
  # with an alternate metal (see the oboe-heroku gem)
  unless defined?(OboeHeroku)
    require 'traceview/base'

    begin
      if RUBY_PLATFORM == 'java'
        require '/usr/local/tracelytics/tracelyticsagent.jar'
        require 'joboe_metal'
      else
        require "oboe_metal.so"
        require "oboe_metal.rb"
      end
    rescue LoadError
      TraceView.loaded = false

      unless ENV['RAILS_GROUP'] == 'assets' or ENV['IGNORE_TRACEVIEW_WARNING']
        $stderr.puts '=============================================================='
        $stderr.puts 'Missing TraceView libraries.  Tracing disabled.'
        $stderr.puts 'See: http://bit.ly/1DaNOjw'
        $stderr.puts '=============================================================='
      end
    end
  end

  require 'traceview/config'
  require 'traceview/loading'
  require 'traceview/method_profiling'

  if TraceView.loaded
    require 'traceview/instrumentation'

    # Frameworks
    require 'traceview/frameworks/rails'
    require 'traceview/frameworks/sinatra'
    require 'traceview/frameworks/padrino'
    require 'traceview/frameworks/grape'
  end

  # Load Ruby module last.  If there is no framework detected,
  # it will load all of the Ruby instrumentation
  require 'traceview/ruby'
  require 'oboe/backward_compatibility'
rescue => e
  $stderr.puts "[traceview/error] Problem loading: #{e.inspect}"
  $stderr.puts e.backtrace
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
traceview-3.1.0-java lib/traceview.rb
traceview-3.1.0 lib/traceview.rb
traceview-3.0.5-java lib/traceview.rb
traceview-3.0.5 lib/traceview.rb
traceview-3.0.4-java lib/traceview.rb
traceview-3.0.4 lib/traceview.rb
traceview-3.0.3-java lib/traceview.rb
traceview-3.0.3 lib/traceview.rb
traceview-3.0.2-java lib/traceview.rb
traceview-3.0.2 lib/traceview.rb