diff --git a/.gitignore b/.gitignore index 5d89c813c7d..9947f3f6576 100644 --- a/.gitignore +++ b/.gitignore @@ -13,6 +13,7 @@ config/oauth_keys.yml config/initializers/secret_token.rb config/redis.conf config/deploy_config.yml +config/newrelic.yml .bundle vendor/bundle/* config/database.yml diff --git a/Gemfile b/Gemfile index c7ab2ddcd99..e21f780acc3 100644 --- a/Gemfile +++ b/Gemfile @@ -52,6 +52,8 @@ gem 'jammit', '0.5.4' gem 'rest-client', '1.6.1' gem 'typhoeus' +gem 'newrelic_rpm', :require => false + #Backups gem 'cloudfiles', '1.4.10', :require => false diff --git a/Gemfile.lock b/Gemfile.lock index ce32423ac24..502d9d96e38 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -235,6 +235,7 @@ GEM net-ssh (2.0.24) net-ssh-gateway (1.1.0) net-ssh (>= 1.99.1) + newrelic_rpm (3.0.1) nokogiri (1.4.3.1) oa-basic (0.2.6) oa-core (= 0.2.6) @@ -428,6 +429,7 @@ DEPENDENCIES mini_magick (= 3.2) mongrel mysql2 (= 0.2.6) + newrelic_rpm nokogiri ohai (= 0.5.8) omniauth (= 0.2.6) diff --git a/config/environment.rb b/config/environment.rb index 26adfb6b142..7e0fc1c1a07 100644 --- a/config/environment.rb +++ b/config/environment.rb @@ -2,6 +2,9 @@ # licensed under the Affero General Public License version 3 or later. See # the COPYRIGHT file. +# use newrelic if configured via config/newrelic.yml +require 'newrelic_rpm' if File.exists?(Rails.root.to_s << '/config/newrelic.yml') + # Load the rails application require File.expand_path('../application', __FILE__) Haml::Template.options[:format] = :html5