Sha256: 71652b272bc123410fa9df334fdbf5ad47945b4a22b341a8bb9b4d9611b11670

Contents?: true

Size: 1.05 KB

Versions: 1

Compression:

Stored size: 1.05 KB

Contents

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

begin
  # 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.has_key?('TRACEVIEW_URL') and ENV['RAILS_GROUP'] != 'assets'

    require "oboe-heroku/thread_local"
    require 'oboe-heroku/base'
    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
  $stderr.puts "[oboe-heroku/error] Failed to load support libs: #{e.message}"

  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
  Oboe.loaded = false
  $stderr.puts "[oboe-heroku/error] #{e.message}"

  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.15.6 lib/oboe-heroku.rb