Skip to content

Commit

Permalink
add New Relic for app performance reporting
Browse files Browse the repository at this point in the history
  • Loading branch information
Josh Gum committed Oct 19, 2016
1 parent a23ebd1 commit 10059c1
Show file tree
Hide file tree
Showing 3 changed files with 114 additions and 1 deletion.
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ gem 'font-awesome-rails'
gem 'attr_extras'

gem 'capistrano', '~> 2.0'
gem 'newrelic_rpm'

group :development do
gem 'spring-commands-rspec'
Expand Down
4 changes: 3 additions & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@ GEM
net-ssh (3.2.0)
net-ssh-gateway (1.2.0)
net-ssh (>= 2.6.5)
newrelic_rpm (3.17.0.325)
nokogiri (1.6.8)
mini_portile2 (~> 2.1.0)
pkg-config (~> 1.1.7)
Expand Down Expand Up @@ -482,6 +483,7 @@ DEPENDENCIES
jquery-ui-rails
json-ld (~> 1.99)
mysql2 (~> 0.3.13)
newrelic_rpm
passenger
poltergeist (~> 1.9.0)
rails (= 4.1.7)
Expand All @@ -507,4 +509,4 @@ DEPENDENCIES
webmock

BUNDLED WITH
1.12.5
1.13.5
110 changes: 110 additions & 0 deletions config/newrelic.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
#
# This file configures the New Relic Agent. New Relic monitors Ruby, Java,
# .NET, PHP, Python and Node applications with deep visibility and low
# overhead. For more information, visit www.newrelic.com.
#
# Generated October 19, 2016
#
# This configuration file is custom generated for OSU Libraries & Press
#
# For full documentation of agent configuration options, please refer to
# https://docs.newrelic.com/docs/agents/ruby-agent/installation-configuration/ruby-agent-configuration

common: &default_settings
# Required license key associated with your New Relic account.
#
# Local and server should have the ENV variable set to enable NewRelic
#license_key: <%= ENV['NEW_RELIC_LICENSE_KEY'] %>

# Your application name. Renaming here affects where data displays in New
# Relic. For more details, see https://docs.newrelic.com/docs/apm/new-relic-apm/maintenance/renaming-applications
app_name: Controlled Vocabulary Manager

# To disable the agent regardless of other settings, uncomment the following:
# agent_enabled: false

# Logging level for log/newrelic_agent.log
log_level: info

# Transaction tracer captures deep information about slow
# transactions and sends this to the New Relic service once a
# minute. Included in the transaction is the exact call sequence of
# the transactions including any SQL statements issued.
transaction_tracer:

# Transaction tracer is enabled by default. Set this to false to
# turn it off. This feature is only available at the Professional
# and above product levels.
enabled: true

# Threshold in seconds for when to collect a transaction
# trace. When the response time of a controller action exceeds
# this threshold, a transaction trace will be recorded and sent to
# New Relic. Valid values are any float value, or (default) "apdex_f",
# which will use the threshold for an dissatisfying Apdex
# controller action - four times the Apdex T value.
transaction_threshold: apdex_f

# When transaction tracer is on, SQL statements can optionally be
# recorded. The recorder has three modes, "off" which sends no
# SQL, "raw" which sends the SQL statement in its original form,
# and "obfuscated", which strips out numeric and string literals.
record_sql: obfuscated

# Threshold in seconds for when to collect stack trace for a SQL
# call. In other words, when SQL statements exceed this threshold,
# then capture and send to New Relic the current stack trace. This is
# helpful for pinpointing where long SQL calls originate from.
stack_trace_threshold: 0.500

# Determines whether the agent will capture query plans for slow
# SQL queries. Only supported in mysql and postgres. Should be
# set to false when using other adapters.
# explain_enabled: true

# Threshold for query execution time below which query plans will
# not be captured. Relevant only when `explain_enabled` is true.
# explain_threshold: 0.5

# Error collector captures information about uncaught exceptions and
# sends them to New Relic for viewing
error_collector:

# Error collector is enabled by default. Set this to false to turn
# it off. This feature is only available at the Professional and above
# product levels.
enabled: true

# Rails Only - tells error collector whether or not to capture a
# source snippet around the place of the error when errors are View
# related.
capture_source: true

# To stop specific errors from reporting to New Relic, set this property
# to comma-separated values. Default is to ignore routing errors,
# which are how 404's get triggered.
ignore_errors: "ActionController::RoutingError,Sinatra::NotFound"


# Environment-specific settings are in this section.
# RAILS_ENV or RACK_ENV (as appropriate) is used to determine the environment.
# If your application has other named environments, configure them here.
development:
<<: *default_settings
app_name: Controlled Vocabulary Manager (Development)

# NOTE: There is substantial overhead when running in developer mode.
# Do not use for production or load testing.
developer_mode: true

test:
<<: *default_settings
# It doesn't make sense to report to New Relic from automated test runs.
monitor_mode: false

staging:
<<: *default_settings
app_name: Controlled Vocabulary Manager (Staging)

production:
<<: *default_settings

0 comments on commit 10059c1

Please sign in to comment.