From dc44dda30c47d86fdd6e80df04eccc41c58972ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Thu, 12 Aug 2021 02:54:46 +0200 Subject: [PATCH] Remove newrelic gem dependency We haven't updated the gem for years and don't know whether it still works with our current Ruby and Rails versions. Besides, dependabot keeps opening pull requests to update it. In theory we could just ignore the dependabot pull requests for this dependency, but unfortunately right now we can't add a dependabot config file because it would open pull requests on forks as well. Finally, there are other companies offering similar services for Rails applications, and it's up to each CONSUL installation to decide which one is better for them. We might add a self-hosted performance monitoring tool in the future. Since other CONSUL installations might be using Newrelic, and in general we recommend adding an application monitoring tool, we're suggesting it in the custom gemfile. In the name of neutrality, we're also adding Sentry. We might add other services in the future. --- Gemfile | 1 - Gemfile.lock | 2 -- Gemfile_custom | 21 ++++++++++++++++++++ config/newrelic.yml | 47 --------------------------------------------- 4 files changed, 21 insertions(+), 50 deletions(-) delete mode 100644 config/newrelic.yml diff --git a/Gemfile b/Gemfile index 44e3e9e51..deac05df8 100644 --- a/Gemfile +++ b/Gemfile @@ -33,7 +33,6 @@ gem "jquery-fileupload-rails" gem "jquery-rails", "~> 4.4.0" gem "jquery-ui-rails", "~> 6.0.1" gem "kaminari", "~> 1.2.1" -gem "newrelic_rpm", "~> 4.1.0.333" gem "omniauth", "~> 2.0.4" gem "omniauth-facebook", "~> 8.0.0" gem "omniauth-google-oauth2", "~> 1.0.0" diff --git a/Gemfile.lock b/Gemfile.lock index 48d612d2f..7fe97db76 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -387,7 +387,6 @@ GEM net-scp (3.0.0) net-ssh (>= 2.6.5, < 7.0.0) net-ssh (6.1.0) - newrelic_rpm (4.1.0.333) nio4r (2.5.8) nokogiri (1.12.5) mini_portile2 (~> 2.6.1) @@ -744,7 +743,6 @@ DEPENDENCIES launchy (~> 2.5.0) letter_opener_web (~> 1.4.0) mdl (~> 0.11.0) - newrelic_rpm (~> 4.1.0.333) omniauth (~> 2.0.4) omniauth-facebook (~> 8.0.0) omniauth-google-oauth2 (~> 1.0.0) diff --git a/Gemfile_custom b/Gemfile_custom index 9d91e0680..128ea0f26 100644 --- a/Gemfile_custom +++ b/Gemfile_custom @@ -3,3 +3,24 @@ # * English: https://github.com/consul/consul/blob/master/CUSTOMIZE_EN.md#gemfile # * Spanish: https://github.com/consul/consul/blob/master/CUSTOMIZE_ES.md#gemfile # + +###### Application monitoring services ###### +# +# By default Consul supports the Errbit self-hosted error monitoring service, +# through the Airbrake gem. That means Consul also supports using Airbrake as +# an external service to monitor errors and application performance. +# +# Here are some other services which can be used to monitor application errors +# and performance. + +# Newrelic is an external service which helps you monitor the application +# performance +# gem "newrelic_rpm", "insert_gem_version_here" + +# Sentry is an external or self-hosted service which helps you monitor the +# application errors and performance +# gem "sentry-ruby", "insert_gem_version_here" + +###### Other gems ###### +# +# Add your custom gem dependencies here diff --git a/config/newrelic.yml b/config/newrelic.yml deleted file mode 100644 index f2ebf5526..000000000 --- a/config/newrelic.yml +++ /dev/null @@ -1,47 +0,0 @@ -# -# 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 September 08, 2015, for version 3.13.0.299 -# -# 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.secrets.newrelic_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: CONSUL - - # 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: CONSUL (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: CONSUL (Staging) - -production: - <<: *default_settings