Sha256: 3d7264bcca0c0f6f50cf54d04437c1d3992ae716104360978dd7f0ed4327f90c

Contents?: true

Size: 1.04 KB

Versions: 1

Compression:

Stored size: 1.04 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.16.1 lib/oboe-heroku.rb