From 8e0d80dd1001c336a608f84c5307f4eaff31a413 Mon Sep 17 00:00:00 2001 From: olegphenomenon Date: Wed, 24 Nov 2021 22:40:20 +0200 Subject: [PATCH 1/5] added new-relic gem for monitoring --- .gitignore | 1 + Gemfile | 2 ++ Gemfile.lock | 14 ++++++++++++++ 3 files changed, 17 insertions(+) diff --git a/.gitignore b/.gitignore index 3f23f1277b..d2f47b6059 100644 --- a/.gitignore +++ b/.gitignore @@ -9,6 +9,7 @@ /config/application.yml /config/environments/development.rb /config/deploy.rb +/config/newrelic.yml /.idea # Do not commit one. Instead, download the latest from https://github.com/internetee/style-guide. diff --git a/Gemfile b/Gemfile index 1900c02f14..9cad38da69 100644 --- a/Gemfile +++ b/Gemfile @@ -102,3 +102,5 @@ gem 'aws-sdk-sesv2', '~> 1.19' # profiles gem 'pghero' gem 'pg_query', '>= 0.9.0' +gem 'newrelic_rpm' +gem 'newrelic-infinite_tracing' diff --git a/Gemfile.lock b/Gemfile.lock index 03e7897672..c0a0646ccb 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -235,6 +235,14 @@ GEM activesupport (>= 5.0) google-protobuf (3.19.1) google-protobuf (3.19.1-x86_64-linux) + googleapis-common-protos-types (1.3.0) + google-protobuf (~> 3.14) + grpc (1.41.1) + google-protobuf (~> 3.17) + googleapis-common-protos-types (~> 1.0) + grpc (1.41.1-x86_64-linux) + google-protobuf (~> 3.17) + googleapis-common-protos-types (~> 1.0) gyoku (1.3.1) builder (>= 2.1.2) haml (5.2.2) @@ -311,6 +319,10 @@ GEM mustermann (1.1.1) ruby2_keywords (~> 0.0.1) netrc (0.11.0) + newrelic-infinite_tracing (8.1.0) + grpc (~> 1.34) + newrelic_rpm (= 8.1.0) + newrelic_rpm (8.1.0) nio4r (2.5.8) nokogiri (1.12.5) mini_portile2 (~> 2.6.1) @@ -554,6 +566,8 @@ DEPENDENCIES mimemagic (= 0.4.3) minitest (~> 5.14) money-rails + newrelic-infinite_tracing + newrelic_rpm nokogiri (~> 1.12.5) omniauth omniauth-rails_csrf_protection From 2f8f81fdda697343626dba575175ee3fa2e04218 Mon Sep 17 00:00:00 2001 From: olegphenomenon Date: Wed, 24 Nov 2021 23:14:35 +0200 Subject: [PATCH 2/5] added newrelic conf --- config/newrelic.yml | 51 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 config/newrelic.yml diff --git a/config/newrelic.yml b/config/newrelic.yml new file mode 100644 index 0000000000..4958470756 --- /dev/null +++ b/config/newrelic.yml @@ -0,0 +1,51 @@ +# +# 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 November 24, 2021 +# +# 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: eu01xxa40daea91d5bf28f03edbe049585f1NRAL + + # 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: Registry + + 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: Registry (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: Registry (Staging) + monitor_mode: false + + +production: + <<: *default_settings + monitor_mode: false From 16f7fa7c4e8c90422130b0528bb2498c017c89aa Mon Sep 17 00:00:00 2001 From: olegphenomenon Date: Wed, 24 Nov 2021 23:26:30 +0200 Subject: [PATCH 3/5] removed --- config/newrelic.yml | 51 --------------------------------------------- 1 file changed, 51 deletions(-) delete mode 100644 config/newrelic.yml diff --git a/config/newrelic.yml b/config/newrelic.yml deleted file mode 100644 index 4958470756..0000000000 --- a/config/newrelic.yml +++ /dev/null @@ -1,51 +0,0 @@ -# -# 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 November 24, 2021 -# -# 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: eu01xxa40daea91d5bf28f03edbe049585f1NRAL - - # 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: Registry - - 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: Registry (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: Registry (Staging) - monitor_mode: false - - -production: - <<: *default_settings - monitor_mode: false From 732120d7d227e438f3695bed7e56c88a6761e070 Mon Sep 17 00:00:00 2001 From: olegphenomenon Date: Thu, 25 Nov 2021 07:52:55 +0200 Subject: [PATCH 4/5] added newrelic conf --- .gitignore | 1 - config/application.yml.sample | 6 +++-- config/newrelic.yml | 51 +++++++++++++++++++++++++++++++++++ 3 files changed, 55 insertions(+), 3 deletions(-) create mode 100644 config/newrelic.yml diff --git a/.gitignore b/.gitignore index d2f47b6059..3f23f1277b 100644 --- a/.gitignore +++ b/.gitignore @@ -9,7 +9,6 @@ /config/application.yml /config/environments/development.rb /config/deploy.rb -/config/newrelic.yml /.idea # Do not commit one. Instead, download the latest from https://github.com/internetee/style-guide. diff --git a/config/application.yml.sample b/config/application.yml.sample index 8133382c99..644a981455 100644 --- a/config/application.yml.sample +++ b/config/application.yml.sample @@ -42,6 +42,8 @@ directo_invoice_url: 'https://domain/ddddd.asp' cdns_scanner_input_file: '/opt/cdns/input.txt' cdns_scanner_output_file: '/opt/cdns/output.txt' dnssec_resolver_ips: 8.8.8.8, 8.8.4.4 + +newrelic_secret: 'some-secret' # # EPP # @@ -203,14 +205,14 @@ test: cdns_scanner_output_file: 'test/fixtures/files/cdns_output.txt' dnssec_resolver_ips: 8.8.8.8, 8.8.4.4 legal_documents_dir: 'test/fixtures/files' - + openssl_config_path: 'test/fixtures/files/test_ca/openssl.cnf' crl_dir: 'test/fixtures/files/test_ca/crl' crl_path: 'test/fixtures/files/test_ca/crl/crl.pem' ca_cert_path: 'test/fixtures/files/test_ca/certs/ca.crt.pem' ca_key_path: 'test/fixtures/files/test_ca/private/ca.key.pem' ca_key_password: 'password' - + cert_path: 'test/fixtures/files/webclient/webclient.crt.pem' key_path: 'test/fixtures/files/webclient/webclient.key.pem' epp_hostname: 'epp_proxy' diff --git a/config/newrelic.yml b/config/newrelic.yml new file mode 100644 index 0000000000..7f9f556cf4 --- /dev/null +++ b/config/newrelic.yml @@ -0,0 +1,51 @@ +# +# 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 November 24, 2021 +# +# 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: <%= ENV['newrelic_secret'] %> + + # 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: Registry + + 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: Registry (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: Registry (Staging) + monitor_mode: false + + +production: + <<: *default_settings + monitor_mode: false From a6718394245dbdcf4a78b1670ab1a4eabf9247aa Mon Sep 17 00:00:00 2001 From: olegphenomenon Date: Thu, 25 Nov 2021 09:42:55 +0200 Subject: [PATCH 5/5] updated bundler --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index c0a0646ccb..f5b828e4da 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -168,7 +168,7 @@ GEM aws-eventstream (~> 1, >= 1.0.2) bcrypt (3.1.16) bindata (2.4.10) - bootsnap (1.8.1) + bootsnap (1.9.3) msgpack (~> 1.0) bootstrap-sass (3.4.1) autoprefixer-rails (>= 5.2.1)