Sha256: 70ed2e3df896d518e578315ab0e11c95aae37ccb4ea79ab723614efccf6d03aa

Contents?: true

Size: 736 Bytes

Versions: 11

Compression:

Stored size: 736 Bytes

Contents

class NewRelic::Config::Merb < NewRelic::Config
  
  def app; :merb; end
  
  def env
    @env ||= ::Merb.env
  end
  def root 
    ::Merb.root
  end
  
  def to_stderr(msg)
    STDERR.puts "NewRelic ~ " + msg 
  end
  
  def start_plugin
    ::Merb::Plugins.add_rakefiles File.join(newrelic_root,"lib/tasks/all.rb")
    
    # Merb gives you a Merb::Plugins.config hash...feel free to put your stuff in your piece of it
    ::Merb::Plugins.config[:newrelic] = {
      :config => self
    }
    
    ::Merb::BootLoader.before_app_loads do
      # require code that must be loaded before the application
    end
    
    if tracers_enabled?
      ::Merb::BootLoader.after_app_loads do
        start_agent
      end
    end
    
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
newrelic_rpm-2.8.1 lib/new_relic/config/merb.rb
newrelic_rpm-2.8.10 lib/new_relic/config/merb.rb
newrelic_rpm-2.8.11 lib/new_relic/config/merb.rb
newrelic_rpm-2.8.2 lib/new_relic/config/merb.rb
newrelic_rpm-2.8.3 lib/new_relic/config/merb.rb
newrelic_rpm-2.8.4 lib/new_relic/config/merb.rb
newrelic_rpm-2.8.5 lib/new_relic/config/merb.rb
newrelic_rpm-2.8.6 lib/new_relic/config/merb.rb
newrelic_rpm-2.8.7 lib/new_relic/config/merb.rb
newrelic_rpm-2.8.8 lib/new_relic/config/merb.rb
newrelic_rpm-2.8.9 lib/new_relic/config/merb.rb