Skip to content

Commit

Permalink
add new relic (#46)
Browse files Browse the repository at this point in the history
  • Loading branch information
yuenmichelle1 authored Oct 20, 2023
1 parent 3700e8f commit 0c8a85d
Show file tree
Hide file tree
Showing 5 changed files with 74 additions and 2 deletions.
4 changes: 4 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ gem 'tzinfo-data', platforms: %i[mingw mswin x64_mingw jruby]
# Use Active Model has_secure_password [https://guides.rubyonrails.org/active_model_basics.html#securepassword]
# gem "bcrypt", "~> 3.1.7"

group :production, :staging do
gem 'newrelic_rpm'
end

group :development, :test do
gem 'database_cleaner'
gem 'debug', platforms: %i[mri mingw x64_mingw]
Expand Down
2 changes: 2 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ GEM
timeout
net-smtp (0.3.3)
net-protocol
newrelic_rpm (9.5.0)
nio4r (2.5.9)
nokogiri (1.15.4-x86_64-darwin)
racc (~> 1.4)
Expand Down Expand Up @@ -279,6 +280,7 @@ DEPENDENCIES
database_cleaner
debug
factory_bot_rails
newrelic_rpm
panoptes-client
pg (~> 1.1)
pry-byebug
Expand Down
2 changes: 1 addition & 1 deletion config/credentials/production.yml.enc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
rceOFDPtID8V0qiUemZw/pIcJvp+1JX9CwyyKMOHP68PkHpa0TBjswQNxzXv74ptqMcBK6Yuv4RVzF7qwmw98FakHRiK7nYjGOlNQViYtKhwN5kcUXcDFwr66B6ZvmKhgXx1Ocj2yQcrnx8CfWsCTvlZUN/b2IsxZZdGUbAynkeVjSqa2a3ykOTI2e+wFzXrHd4uLESfHfJ+L4ewmyk6KgsCRDJsM3sIUWvJst8MeWpQv0nfDGTB6HS8LjpI0caFgOIm9+LiBH3FKW2ynKi2yWp8iNNEiRB+G0gemdNN8i61TYIiGEJgyjMHOYtEQ6dNauuRWfZvw2CIz1Cm1Wpj6L2/DrsLWD1vMJJJR+A6X648b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vVOP4aDYRfz5+Pmy/1pByjwqBn4y+Ddaxd0/kgkEqAy3DUaVw4Uj51WXxgtJU8XNey0FpsgD2kkhoJKwubQN+SbZGbHV5KnpximZtX9bwC5DyiLvE7Ex+iJiGJ0jwfsky5WG/ulJNJY1r4QNF+g9dO2f88zTN9boqqn769Ux/ZhREEvsmBk9Wp8fgcko2gnU018Y67lOpo2P3TdJ/WAu794cN/xjSW0Y2IRhA5jBKeUIn7CbV0LqF6Yb8n/k8+fsXJkN+KYUi0YVl/t8p2K4Uie0FNdEHhzYqoBlT4ZMItRISVRJGvJulM17GzKWoFGI/0NIjD39lqdnd3hVEQXTBnlVQ8t5cl/kdf7Rvkcyu53Uz4hrgjYmLBQLTM89ShKU6zlAxSbUEU7ovAO1Bv8CWdghAQw==--KrNqg3B/8jmABqgq--nSKfZHIPsTdHuyQBN6JAlQ==
2 changes: 1 addition & 1 deletion config/credentials/staging.yml.enc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
PGbmdbmi4qGqkpAPoEEdruRtfzTdqrFUuxKZyKkHogeNKi3V3XRYY7xCIpiVzaOk9x2P88UnPSi3uQJX00YFC5g11ta00WuH9WmPEjr9zSrpXTQ5Vou+dKoTszP2nPauNwUPkrYTM2q3Ew2691GspeXK7D6I+t0Oi0uVckI2C7RJknpcaqxDUwOVV4idGczyenMKPYPoOQ9rBogwG2JvG1YBsS6xul87lHyYqmVB7a2KmAxMLPNFbTwT3ASuwreDZyrG6e2oyXMBG1tFtnyX3wcPkj9A02oTN4mLxoaBVRVQS4T43sFqbGawlDPUdHZbI5B6+ekWpqgMIBQXkvqORyUTmfMGhbs3TEuNYEfKBkO1fo3+B2XtGNOknJPIavwVvaUFt2KYRh2Pmdk2ew7VA9FTt6mzTy6QewA6lA4vPfs01flrRzGDx/+DJCydL+UXX04izUzyH2eul0NWAPTKJ0btocok0GCcJb5mXktgECJXBKWO9j/90UVeupaxetpGp/SsfMjtjildK9M0X33ehmfzeWTqmFp+2mnfQo5R8p9XP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SpA7nGx6IDTmxAQ9RwRKvbpyeJiucEWqiN7Q12bFUj99hLJUatDu3lhS1S5NzaBpVLduxhWfsRIzVGKaiCYbQ613ixDjm5T32H0GJfOg+iXLanLrgqS+uZ9vnivM+JCgtgDDgBX7fphj7bnqZoKjYQp4RRtcuJLRUARU=--vi6WK2GbT6iMe38x--ETUvuIHW3CrAUtzvImQh2A==
66 changes: 66 additions & 0 deletions config/newrelic.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
#
# This file configures the New Relic Agent. New Relic monitors Ruby, Java,
# .NET, PHP, Python, Node, and Go applications with deep visibility and low
# overhead. For more information, visit www.newrelic.com.
#
# Generated October 28, 2022
#
# This configuration file is custom generated for NewRelic Administration
#
# 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.
license_key: <%= Rails.application.credentials.newrelic_license %>

# 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: 'Eras'

distributed_tracing:
enabled: true

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

# agent_enabled: false

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

application_logging:
# If `true`, all logging-related features for the agent can be enabled or disabled
# independently. If `false`, all logging-related features are disabled.
enabled: true
forwarding:
# If `true`, the agent captures log records emitted by this application.
enabled: true
# Defines the maximum number of log records to buffer in memory at a time.
max_samples_stored: 10000
metrics:
# If `true`, the agent captures metrics related to logging for this application.
enabled: true
local_decorating:
# If `true`, the agent decorates logs with metadata to link to entities, hosts, traces, and spans.
# This requires a log forwarder to send your log files to New Relic.
# This should not be used when forwarding is enabled.
enabled: false

# 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: 'Eras (Development)'

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: 'Eras (Staging)'

production:
<<: *default_settings

0 comments on commit 0c8a85d

Please sign in to comment.