From 41f7c284c410afff54f9a299660f8682260a4cb3 Mon Sep 17 00:00:00 2001 From: Luke Baker Date: Mon, 4 Oct 2010 15:54:44 -0400 Subject: [PATCH] ensure New Relic runs in the production API --- config/environment.rb | 2 ++ config/newrelic.yml | 75 +++++++++++++++++++++++++++++++++++++++++++++++---------------------------- 2 files changed, 49 insertions(+), 28 deletions(-) diff --git a/config/environment.rb b/config/environment.rb index f8dfd2c..f9501be 100644 --- a/config/environment.rb +++ b/config/environment.rb @@ -54,6 +54,8 @@ Rails::Initializer.run do |config| :version => '2.0.3' config.gem 'redis', :version => '1.0.7' + config.gem 'newrelic_rpm', + :version => '2.12.3' config.gem 'sendgrid' end diff --git a/config/newrelic.yml b/config/newrelic.yml index f681bbf..5fff86b 100644 --- a/config/newrelic.yml +++ b/config/newrelic.yml @@ -1,18 +1,20 @@ # -# This file configures the NewRelic RPM Agent, NewRelic RPM monitors -# Rails applications with deep visibility and low overhead. For more +# This file configures the New Relic RPM Agent. New Relic RPM monitors +# Rails and Java applications with deep visibility and low overhead. For more # information, visit www.newrelic.com. # -# This configuration file is custom generated for citp +# Generated July 07, 2010 # -# here are the settings that are common to all environments +# This configuration file is custom generated for Allourideas + +# Here are the settings that are common to all environments: common: &default_settings # ============================== LICENSE KEY =============================== - # You must specify the licence key associated with your New Relic + # You must specify the license key associated with your New Relic # account. This key binds your Agent's data to your account in the # New Relic RPM service. - license_key: 'c20a2aedef8b067cf389b85510fb17c1a4ba242e' + license_key: 'ec2ce95d30b5754adec12c0ee6fef0cafa10f7d1' # Agent Enabled (Rails Only) # Use this setting to force the agent to run or not run. @@ -29,19 +31,19 @@ common: &default_settings # into a RPM "application" on your home dashboard page. If you want # to map this instance into multiple apps, like "AJAX Requests" and # "All UI" then specify a semicolon separated list of up to three - # distinct names. This setting does not prevent you from manually - # defining applications. - app_name: My Application + # distinct names. If you comment this out, it defaults to the + # capitalized RAILS_ENV (i.e., Production, Staging, etc) + app_name: Pairwise PRODUCTION API # When "true", the agent collects performance data about your # application and reports this data to the NewRelic RPM service at # newrelic.com. This global switch is normally overridden for each - # environment below. - enabled: true + # environment below. (formerly called 'enabled') + monitor_mode: true - # Developer mode should be off in every enviornment but - # development as it has very high overhead in memory - developer: false + # Developer mode should be off in every environment but + # development as it has very high overhead in memory. + developer_mode: false # The newrelic agent generates its own log file to keep its logging # information separate from that of your application. Specify its @@ -156,15 +158,27 @@ common: &default_settings capture_source: true # To stop specific errors from reporting to RPM, set this property - # to comma separated values + # to comma separated values. Default is to ignore routing errors + # which are how 404's get triggered. # - #ignore_errors: ActionController::RoutingError, ... + ignore_errors: ActionController::RoutingError # (Advanced) Uncomment this to ensure the cpu and memory samplers # won't run. Useful when you are using the agent to monitor an # external resource # disable_samplers: true - + + # If you aren't interested in visibility in these areas, you can + # disable the instrumentation to reduce overhead. + # + # disable_view_instrumentation: true + # disable_activerecord_instrumentation: true + # disable_memcache_instrumentation: true + # disable_dj: true + + # Certain types of instrumentation such as GC stats will not work if + # you are running multi-threaded. Please let us know. + # multi_threaded = false # Application Environments # ------------------------------------------ @@ -174,39 +188,44 @@ common: &default_settings # the environment # NOTE if your application has other named environments, you should -# provide newrelic conifguration settings for these enviromnents here. +# provide newrelic configuration settings for these environments here. development: <<: *default_settings - # Turn off communication to RPM service in development mode. + # Turn off communication to RPM service in development mode (also + # 'enabled'). # NOTE: for initial evaluation purposes, you may want to temporarily # turn the agent on in development mode. - enabled: false + monitor_mode: false # Rails Only - when running in Developer Mode, the New Relic Agent will # present performance information on the last 100 transactions you have - # executed since starting the mongrel. to view this data, go to - # http://localhost:3000/newrelic - developer: true + # executed since starting the mongrel. + # NOTE: There is substantial overhead when running in developer mode. + # Do not use for production or load testing. + developer_mode: true + + # Enable textmate links + # textmate: true test: <<: *default_settings # It almost never makes sense to turn on the agent when running # unit, functional or integration tests or the like. - enabled: false + monitor_mode: false # Turn on the agent in production for 24x7 monitoring. NewRelic # testing shows an average performance impact of < 5 ms per # transaction, you you can leave this on all the time without -# incurring any user-visible performance degredation. +# incurring any user-visible performance degradation. production: <<: *default_settings - enabled: true + monitor_mode: true # Many applications have a staging environment which behaves # identically to production. Support for that environment is provided # here. By default, the staging environment has the agent turned on. staging: <<: *default_settings - enabled: true - app_name: My Application (Staging) + monitor_mode: true + app_name: Pairwise API (Staging) -- libgit2 0.21.2