Commit 41f7c284c410afff54f9a299660f8682260a4cb3

Authored by Luke Baker
1 parent 1c3b3dc2

ensure New Relic runs in the production API

make a few configuration updates that ensure New Relic will run on the
production API
Showing 2 changed files with 49 additions and 28 deletions   Show diff stats
config/environment.rb
@@ -54,6 +54,8 @@ Rails::Initializer.run do |config| @@ -54,6 +54,8 @@ Rails::Initializer.run do |config|
54 :version => '2.0.3' 54 :version => '2.0.3'
55 config.gem 'redis', 55 config.gem 'redis',
56 :version => '1.0.7' 56 :version => '1.0.7'
  57 + config.gem 'newrelic_rpm',
  58 + :version => '2.12.3'
57 59
58 config.gem 'sendgrid' 60 config.gem 'sendgrid'
59 end 61 end
config/newrelic.yml
1 # 1 #
2 -# This file configures the NewRelic RPM Agent, NewRelic RPM monitors  
3 -# Rails applications with deep visibility and low overhead. For more 2 +# This file configures the New Relic RPM Agent. New Relic RPM monitors
  3 +# Rails and Java applications with deep visibility and low overhead. For more
4 # information, visit www.newrelic.com. 4 # information, visit www.newrelic.com.
5 # 5 #
6 -# This configuration file is custom generated for citp 6 +# Generated July 07, 2010
7 # 7 #
8 -# here are the settings that are common to all environments 8 +# This configuration file is custom generated for Allourideas
  9 +
  10 +# Here are the settings that are common to all environments:
9 common: &default_settings 11 common: &default_settings
10 # ============================== LICENSE KEY =============================== 12 # ============================== LICENSE KEY ===============================
11 13
12 - # You must specify the licence key associated with your New Relic 14 + # You must specify the license key associated with your New Relic
13 # account. This key binds your Agent's data to your account in the 15 # account. This key binds your Agent's data to your account in the
14 # New Relic RPM service. 16 # New Relic RPM service.
15 - license_key: 'c20a2aedef8b067cf389b85510fb17c1a4ba242e' 17 + license_key: 'ec2ce95d30b5754adec12c0ee6fef0cafa10f7d1'
16 18
17 # Agent Enabled (Rails Only) 19 # Agent Enabled (Rails Only)
18 # Use this setting to force the agent to run or not run. 20 # Use this setting to force the agent to run or not run.
@@ -29,19 +31,19 @@ common: &default_settings @@ -29,19 +31,19 @@ common: &default_settings
29 # into a RPM "application" on your home dashboard page. If you want 31 # into a RPM "application" on your home dashboard page. If you want
30 # to map this instance into multiple apps, like "AJAX Requests" and 32 # to map this instance into multiple apps, like "AJAX Requests" and
31 # "All UI" then specify a semicolon separated list of up to three 33 # "All UI" then specify a semicolon separated list of up to three
32 - # distinct names. This setting does not prevent you from manually  
33 - # defining applications.  
34 - app_name: My Application 34 + # distinct names. If you comment this out, it defaults to the
  35 + # capitalized RAILS_ENV (i.e., Production, Staging, etc)
  36 + app_name: Pairwise PRODUCTION API
35 37
36 # When "true", the agent collects performance data about your 38 # When "true", the agent collects performance data about your
37 # application and reports this data to the NewRelic RPM service at 39 # application and reports this data to the NewRelic RPM service at
38 # newrelic.com. This global switch is normally overridden for each 40 # newrelic.com. This global switch is normally overridden for each
39 - # environment below.  
40 - enabled: true 41 + # environment below. (formerly called 'enabled')
  42 + monitor_mode: true
41 43
42 - # Developer mode should be off in every enviornment but  
43 - # development as it has very high overhead in memory  
44 - developer: false 44 + # Developer mode should be off in every environment but
  45 + # development as it has very high overhead in memory.
  46 + developer_mode: false
45 47
46 # The newrelic agent generates its own log file to keep its logging 48 # The newrelic agent generates its own log file to keep its logging
47 # information separate from that of your application. Specify its 49 # information separate from that of your application. Specify its
@@ -156,15 +158,27 @@ common: &default_settings @@ -156,15 +158,27 @@ common: &default_settings
156 capture_source: true 158 capture_source: true
157 159
158 # To stop specific errors from reporting to RPM, set this property 160 # To stop specific errors from reporting to RPM, set this property
159 - # to comma separated values 161 + # to comma separated values. Default is to ignore routing errors
  162 + # which are how 404's get triggered.
160 # 163 #
161 - #ignore_errors: ActionController::RoutingError, ... 164 + ignore_errors: ActionController::RoutingError
162 165
163 # (Advanced) Uncomment this to ensure the cpu and memory samplers 166 # (Advanced) Uncomment this to ensure the cpu and memory samplers
164 # won't run. Useful when you are using the agent to monitor an 167 # won't run. Useful when you are using the agent to monitor an
165 # external resource 168 # external resource
166 # disable_samplers: true 169 # disable_samplers: true
167 - 170 +
  171 + # If you aren't interested in visibility in these areas, you can
  172 + # disable the instrumentation to reduce overhead.
  173 + #
  174 + # disable_view_instrumentation: true
  175 + # disable_activerecord_instrumentation: true
  176 + # disable_memcache_instrumentation: true
  177 + # disable_dj: true
  178 +
  179 + # Certain types of instrumentation such as GC stats will not work if
  180 + # you are running multi-threaded. Please let us know.
  181 + # multi_threaded = false
168 182
169 # Application Environments 183 # Application Environments
170 # ------------------------------------------ 184 # ------------------------------------------
@@ -174,39 +188,44 @@ common: &default_settings @@ -174,39 +188,44 @@ common: &default_settings
174 # the environment 188 # the environment
175 189
176 # NOTE if your application has other named environments, you should 190 # NOTE if your application has other named environments, you should
177 -# provide newrelic conifguration settings for these enviromnents here. 191 +# provide newrelic configuration settings for these environments here.
178 192
179 development: 193 development:
180 <<: *default_settings 194 <<: *default_settings
181 - # Turn off communication to RPM service in development mode. 195 + # Turn off communication to RPM service in development mode (also
  196 + # 'enabled').
182 # NOTE: for initial evaluation purposes, you may want to temporarily 197 # NOTE: for initial evaluation purposes, you may want to temporarily
183 # turn the agent on in development mode. 198 # turn the agent on in development mode.
184 - enabled: false 199 + monitor_mode: false
185 200
186 # Rails Only - when running in Developer Mode, the New Relic Agent will 201 # Rails Only - when running in Developer Mode, the New Relic Agent will
187 # present performance information on the last 100 transactions you have 202 # present performance information on the last 100 transactions you have
188 - # executed since starting the mongrel. to view this data, go to  
189 - # http://localhost:3000/newrelic  
190 - developer: true 203 + # executed since starting the mongrel.
  204 + # NOTE: There is substantial overhead when running in developer mode.
  205 + # Do not use for production or load testing.
  206 + developer_mode: true
  207 +
  208 + # Enable textmate links
  209 + # textmate: true
191 210
192 test: 211 test:
193 <<: *default_settings 212 <<: *default_settings
194 # It almost never makes sense to turn on the agent when running 213 # It almost never makes sense to turn on the agent when running
195 # unit, functional or integration tests or the like. 214 # unit, functional or integration tests or the like.
196 - enabled: false 215 + monitor_mode: false
197 216
198 # Turn on the agent in production for 24x7 monitoring. NewRelic 217 # Turn on the agent in production for 24x7 monitoring. NewRelic
199 # testing shows an average performance impact of < 5 ms per 218 # testing shows an average performance impact of < 5 ms per
200 # transaction, you you can leave this on all the time without 219 # transaction, you you can leave this on all the time without
201 -# incurring any user-visible performance degredation. 220 +# incurring any user-visible performance degradation.
202 production: 221 production:
203 <<: *default_settings 222 <<: *default_settings
204 - enabled: true 223 + monitor_mode: true
205 224
206 # Many applications have a staging environment which behaves 225 # Many applications have a staging environment which behaves
207 # identically to production. Support for that environment is provided 226 # identically to production. Support for that environment is provided
208 # here. By default, the staging environment has the agent turned on. 227 # here. By default, the staging environment has the agent turned on.
209 staging: 228 staging:
210 <<: *default_settings 229 <<: *default_settings
211 - enabled: true  
212 - app_name: My Application (Staging) 230 + monitor_mode: true
  231 + app_name: Pairwise API (Staging)