Sha256: 08870f28cd8095b33ed1266450b14be1850aee17932870b1f58855eb599442a0

Contents?: true

Size: 1.03 KB

Versions: 1

Compression:

Stored size: 1.03 KB

Contents

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

module OboeHeroku; end

begin
  require "oboe-heroku/thread_local"
  require 'oboe-heroku/base'

  # TRACEVIEW_URL env var is standard with the Heroku addon.  We
  # use it to determine if we are actually running in Heroku or not.
  if ENV.key?('TRACEVIEW_URL')

    require 'oboe_metal.so'
    require 'heroku_metal'

    require 'oboe-heroku/loading'
    require 'oboe-heroku/version'

    # Require the core oboe gem
    require 'oboe'

    ::OboeHeroku::Loading.configure if Oboe.loaded
  end
rescue LoadError => e
  Oboe.loaded = false

  if ENV.has_key?('TRACEVIEW_DEBUG_LEVEL') and (ENV['TRACEVIEW_DEBUG_LEVEL'].to_i > 1)
    $stderr.puts "[oboe-heroku/error] Failed to load support libs: #{e.message}"
    $stderr.puts e.backtrace.join("\n")
  end
rescue Exception => e
  $stderr.puts "[oboe-heroku/error] #{e.message}"
  Oboe.loaded = false

  if ENV.has_key?('TRACEVIEW_DEBUG_LEVEL') and (ENV['TRACEVIEW_DEBUG_LEVEL'].to_i > 1)
    $stderr.puts e.backtrace.join("\n")
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
oboe-heroku-0.9.18.1 lib/oboe-heroku.rb