Sha256: 8b80844d1046574a69f13cb99335955d84fc8740144635af9ff8cb289fa555bd

Contents?: true

Size: 1.03 KB

Versions: 2

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
  $stderr.puts "[oboe-heroku/error] Failed to load support libs: #{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
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

2 entries across 2 versions & 1 rubygems

Version Path
oboe-heroku-0.9.17.8 lib/oboe-heroku.rb
oboe-heroku-0.9.17.3 lib/oboe-heroku.rb