Sha256: b0d8fa77f29bc976224731eabcaa45429a881e18fa7a0dbf6e7062b4283a0fe7

Contents?: true

Size: 1.48 KB

Versions: 2

Compression:

Stored size: 1.48 KB

Contents

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

begin
  require 'oboe/version'
  require 'oboe/logger'
  require 'oboe/util'
  require 'oboe/xtrace'

  # If Oboe_metal is already defined then we are in a PaaS environment
  # with an alternate metal (such as Heroku: see the oboe-heroku gem)
  unless defined?(Oboe_metal)
    begin
      if RUBY_PLATFORM == 'java'
        require '/usr/local/tracelytics/tracelyticsagent.jar'
        require 'joboe_metal'
      else
        require 'oboe_metal.so'
        require 'oboe_metal'
      end
    rescue LoadError
      Oboe.loaded = false

      unless ENV['RAILS_GROUP'] == 'assets'
        $stderr.puts "=============================================================="
        $stderr.puts "Missing TraceView libraries.  Tracing disabled."
        $stderr.puts "See: https://support.tv.appneta.com/solution/articles/137973"
        $stderr.puts "=============================================================="
      end
    end
  end

  require 'oboe/config'
  require 'oboe/loading'
  require 'method_profiling'
  require 'oboe/instrumentation'
  require 'oboe/ruby'

  # Frameworks
  if Oboe.loaded
    require 'oboe/frameworks/rails'   if defined?(::Rails)
    require 'oboe/frameworks/sinatra' if defined?(::Sinatra)
    require 'oboe/frameworks/padrino' if defined?(::Padrino)
    require 'oboe/frameworks/grape'   if defined?(::Grape)
  end
rescue Exception => e
  $stderr.puts "[oboe/error] Problem loading: #{e.inspect}"
  $stderr.puts e.backtrace
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
oboe-2.7.0.3-java lib/oboe.rb
oboe-2.7.0.3 lib/oboe.rb