8000 Add NewRelic + Hoptoad · brusmax/demo.activeadmin.info@fc04f32 · GitHub
[go: up one dir, main page]

Skip to content

Commit fc04f32

Browse files
committed
Add NewRelic + Hoptoad
1 parent 902057d commit fc04f32

File tree

4 files changed

+244
-0
lines changed

4 files changed

+244
-0
lines changed

Gemfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ gem 'nifty-generators'
66
gem "activeadmin", :git => "git://github.com/gregbell/active_admin"
77
gem "faker"
88

9+
gem 'newrelic_rpm', '3.0.0'
10+
gem 'hoptoad_notifier', '2.4.9'
11+
912
group :development do
1013
gem 'mechanize'
1114
end

Gemfile.lock

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,9 @@ GEM
5757
i18n (~> 0.4)
5858
haml (3.1.1)
5959
has_scope (0.5.0)
60+
hoptoad_notifier (2.4.9)
61+
activesupport
62+
builder
6063
i18n (0.5.0)
6164
inherited_resources (1.2.2)
6265
has_scope (~> 0.5.0)
@@ -78,6 +81,7 @@ GEM
7881
activesupport (~> 3.0.2)
7982
arel (~> 2.0.2)
8083
mime-types (1.16)
84+
newrelic_rpm (3.0.0)
8185
nifty-generators (0.4.6)
8286
nokogiri (1.4.4)
8387
orm_adapter (0.0.5)
@@ -119,7 +123,9 @@ PLATFORMS
119123
DEPENDENCIES
120124
activeadmin!
121125
faker
126+
hoptoad_notifier (= 2.4.9)
122127
mechanize
128+
newrelic_rpm (= 3.0.0)
123129
nifty-generators
124130
rails (= 3.0.6)
125131
sqlite3-ruby

config/initializers/hoptoad.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
HoptoadNotifier.configure do |config|
2+
config.api_key = '1bb6d597bc210f8457b9e624bfe95b96'
3+
end

config/newrelic.yml

Lines changed: 232 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,232 @@
1+
#
2+
# This file configures the New Relic Agent. New Relic monitors
3+
# Rails and Java applications with deep visibility and low overhead. For more
4+
# information, visit www.newrelic.com.
5+
#
6+
# Generated May 12, 2011
7+
#
8+
# This configuration file is custom generated for ActiveAdmin
9+
10+
# Here are the settings that are common to all environments:
11+
common: &default_settings
12+
# ============================== LICENSE KEY ===============================
13+
14+
# You must specify the license key associated with your New Relic
15+
# account. This key binds your Agent's data to your account in the
16+
# New Relic service.
17+
license_key: '7e5d5ad840f8474c589df050633543adbee7f351'
18+
19+
# Agent Enabled (Rails Only)
20+
# Use this setting to force the agent to run or not run.
21+
# Default is 'auto' which means the agent will install and run only
22+
# if a valid dispatcher such as Mongrel is running. This prevents
23+
# it from running with Rake or the console. Set to false to
24+
# completely turn the agent off regardless of the other settings.
25+
# Valid values are true, false and auto.
26+
# agent_enabled: auto
27+
28+
# Application Name
29+
# Set this to be the name of your application as you'd like it show
30+
# up in New Relic. New Relic will then auto-map instances of your application
31+
# into a New Relic "application" on your home dashboard page. If you want
32+
# to map this instance into multiple apps, like "AJAX Requests" and
33+
# "All UI" then specify a semicolon separated list of up to three
34+
# distinct names. If you comment this out, it defaults to the
35+
# capitalized RAILS_ENV (i.e., Production, Staging, etc)
36+
app_name: Active Admin Demo
37+
38+
# When "true", the agent collects performance data about your
39+
# application and reports this data to the New Relic service at
40+
# newrelic.com. This global switch is normally overridden for each
41+
# environment below. (formerly called 'enabled')< 341A /div>
42+
monitor_mode: true
43+
44+
# Developer mode should be off in every environment but
45+
# development as it has very high overhead in memory.
46+
developer_mode: false
47+
48+
# The newrelic agent generates its own log file to keep its logging
49+
# information separate from that of your application. Specify its
50+
# log level here.
51+
log_level: info
52+
53+
# The newrelic agent communicates with the New Relic service via http by
54+
# default. If you want to communicate via https to increase
55+
# security, then turn on SSL by setting this value to true. Note,
56+
# this will result in increased CPU overhead to perform the
57+
# encryption involved in SSL communication, but this work is done
58+
# asynchronously to the threads that process your application code,
59+
# so it should not impact response times.
60+
ssl: false
61+
62+
# EXPERIMENTAL: enable verification of the SSL certificate sent by
63+
# the server. This setting has no effect unless SSL is enabled
64+
# above. This may block your application. Only enable it if the data
65+
# you send us needs end-to-end verified certificates.
66+
#
67+
# This means we cannot cache the DNS lookup, so each request to the
68+
# New Relic service will perform a lookup. It also means that we cannot
69+
# use a non-blocking lookup, so in a worst case, if you have DNS
70+
# problems, your app may block indefinitely.
71+
# verify_certificate: true
72+
73+
# Set your application's Apdex threshold value with the 'apdex_t'
74+
# setting, in seconds. The apdex_t value determines the buckets used
75+
# to compute your overall Apdex score.
76+
# Requests that take less than apdex_t seconds to process will be
77+
# classified as Satisfying transactions; more than apdex_t seconds
78+
# as Tolerating transactions; and more than four times the apdex_t
79+
# value as Frustrating transactions.
80+
# For more about the Apdex standard, see
81+
# http://support.newrelic.com/faqs/general/apdex
82+
83+
apdex_t: 0.5
84+
85+
# Proxy settings for connecting to the New Relic server.
86+
#
87+
# If a proxy is used, the host setting is required. Other settings
88+
# are optional. Default port is 8080.
89+
#
90+
# proxy_host: hostname
91+
# proxy_port: 8080
92+
# proxy_user:
93+
# proxy_pass:
94+
95+
96+
# Tells transaction tracer and error collector (when enabled)
97+
# whether or not to capture HTTP params. When true, frameworks can
98+
# exclude HTTP parameters from being captured.
99+
# Rails: the RoR filter_parameter_logging excludes parameters
100+
# Java: create a config setting called "ignored_params" and set it to
101+
# a comma separated list of HTTP parameter names.
102+
# ex: ignored_params: credit_card, ssn, password
103+
capture_params: false
104+
105+
106+
# Transaction tracer captures deep information about slow
107+
# transactions and sends this to the New Relic service once a
108+
# minute. Included in the transaction is the exact call sequence of
109+
# the transactions including any SQL statements issued.
110+
transaction_tracer:
111+
112+
# Transaction tracer is enabled by default. Set this to false to
113+
# turn it off. This feature is only available at the Silver and
114+
# above product levels.
115+
enabled: true
116+
117+
# Threshold in seconds for when to collect a transaction
118+
# trace. When the response time of a controller action exceeds
119+
# this threshold, a transaction trace will be recorded and sent to
120+
# New Relic. Valid values are any float value, or (default) "apdex_f",
121+
# which will use the threshold for an dissatisfying Apdex
122+
# controller action - four times the Apdex T value.
123+
transaction_threshold: apdex_f
124+
125+
# When transaction tracer is on, SQL statements can optionally be
126+
# recorded. The recorder has three modes, "off" which sends no
127+
# SQL, "raw" which sends the SQL statement in its original form,
128+
# and "obfuscated", which strips out numeric and string literals
129+
record_sql: obfuscated
130+
131+
# Threshold in seconds for when to collect stack trace for a SQL
132+
# call. In other words, when SQL statements exceed this threshold,
133+
# then capture and send to New Relic the current stack trace. This is
134+
# helpful for pinpointing where long SQL calls originate from
135+
stack_trace_threshold: 0.500
136+
137+
# Determines whether the agent will capture query plans for slow
138+
# SQL queries. Only supported in mysql and postgres. Should be
139+
# set to false when using other adapters.
140+
# explain_enabled: true
141+
142+
# Threshold for query execution time below which query plans will not
143+
# not be captured. Relevant only when `explain_enabled` is true.
144+
# explain_threshold: 0.5
145+
146+
# Error collector captures information about uncaught exceptions and
147+
# sends them to New Relic for viewing
148+
error_collector:
149+
150+
# Error collector is enabled by default. Set this to false to turn
151+
# it off. This feature is only available at the Silver and above
152+
# product levels
153+
enabled: true
154+
155+
# Rails Only - tells error collector whether or not to capture a
156+
# source snippet around the place of the error when errors are View
157+
# related.
158+
capture_source: true
159+
160+
# To stop specific errors from reporting to New Relic, set this property
161+
# to comma separated values. Default is to ignore routing errors
162+
# which are how 404's get triggered.
163+
#
164+
ignore_errors: ActionController::RoutingError
165+
166+
# (Advanced) Uncomment this to ensure the cpu and memory samplers
167+
# won't run. Useful when you are using the agent to monitor an
168+
# external resource
169+
# disable_samplers: true
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
182+
183+
# Application Environments
184+
# ------------------------------------------
185+
# Environment specific settings are in this section.
186+
# For Rails applications, RAILS_ENV is used to determine the environment
187+
# For Java applications, pass -Dnewrelic.environment <environment> to set
188+
# the environment
189+
190+
# NOTE if your application has other named environments, you should
191+
# provide newrelic configuration settings for these environments here.
192+
193+
development:
194+
<<: *default_settings
195+
# Turn off communication to New Relic service in development mode (also
196+
# 'enabled').
197+
# NOTE: for initial evaluation purposes, you may want to temporarily
198+
# turn the agent on in development mode.
199+
monitor_mode: false
200+
201+
# Rails Only - when running in Developer Mode, the New Relic Agent will
202+
# present performance information on the last 100 transactions you have
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
210+
211+
test:
212+
<<: *default_settings
213+
# It almost never makes sense to turn on the agent when running
214+
# unit, functional or integration tests or the like.
215+
monitor_mode: false
216+
217+
# Turn on the agent in production for 24x7 monitoring. NewRelic
218+
# testing shows an average performance impact of < 5 ms per
219+
# transaction, you you can leave this on all the time without
220+
# incurring any user-visible performance degradation.
221+
production:
222+
<<: *default_settings
223+
monitor_mode: true
224+
225+
# Many applications have a staging environment which behaves
226+
# identically to production. Support for that environment is provided
227+
# here. By default, the staging environment has the agent turned on.
228+
staging:
229+
<<: *default_settings
230+
monitor_mode: true
231+
app_name: Active Admin (Staging)
232+

0 commit comments

Comments
 (0)
0