From 7d77274ba56db5f77ee08cb7555f6a0774030262 Mon Sep 17 00:00:00 2001 From: Urban Hafner Date: Thu, 26 Dec 2024 17:34:52 +0100 Subject: [PATCH] Revert "Remove NewRelic" This reverts commit 69b8f5ece231f942ffd3e83d431fcee32b66a297. --- Gemfile | 1 + Gemfile.lock | 2 ++ config/honeybadger.yml | 1 + config/newrelic.yml | 44 ++++++++++++++++++++++++++++++++++++++++++ fly.toml | 1 + 5 files changed, 49 insertions(+) create mode 100644 config/newrelic.yml diff --git a/Gemfile b/Gemfile index 9fab06599..800d05361 100644 --- a/Gemfile +++ b/Gemfile @@ -33,6 +33,7 @@ gem "jsbundling-rails" gem "jsonapi-rails" gem "jsonapi-serializer" gem "kaminari" +gem "newrelic_rpm" gem "nokogiri" gem "paper_trail" gem "pg" diff --git a/Gemfile.lock b/Gemfile.lock index c1c1437a9..6b85754ad 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -335,6 +335,7 @@ GEM net-smtp (0.5.0) net-protocol netrc (0.11.0) + newrelic_rpm (9.16.1) nio4r (2.7.4) nokogiri (1.18.0) mini_portile2 (~> 2.8.2) @@ -610,6 +611,7 @@ DEPENDENCIES letter_opener letter_opener_web listen + newrelic_rpm nokogiri paper_trail pg diff --git a/config/honeybadger.yml b/config/honeybadger.yml index 3739075f4..e16c66cc5 100644 --- a/config/honeybadger.yml +++ b/config/honeybadger.yml @@ -33,3 +33,4 @@ exceptions: - ActionDispatch::Http::Parameters::ParseError - ActionController::BadRequest - Redis::ConnectionError + - Rack::Timeout::RequestTimeoutException diff --git a/config/newrelic.yml b/config/newrelic.yml new file mode 100644 index 000000000..875a587d7 --- /dev/null +++ b/config/newrelic.yml @@ -0,0 +1,44 @@ +# +# 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 December 16, 2020 +# +# 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 + # 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: Fountain Pen Companion + + 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 + +# 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: Fountain Pen Companion (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: Fountain Pen Companion (Staging) + +production: + <<: *default_settings diff --git a/fly.toml b/fly.toml index c1490dd1b..17eb3c9ef 100644 --- a/fly.toml +++ b/fly.toml @@ -16,6 +16,7 @@ release_command = 'bundle exec rake db:migrate db:seed' [env] BUNDLE_WITHOUT = "development:test" +NEW_RELIC_AGENT_ENABLED = "false" RACK_ENV = "production" RACK_TIMEOUT_SERVICE_TIMEOUT = "25" RAILS_ENV = "production"