diff --git a/CHANGELOG.md b/CHANGELOG.md index da390d5d0..99a486683 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +19.05.2015 + +* Added possibility to define NewRelic app_name at application.yml file with 'new_relic_app_name' attribute. + 18.05.2015 * Added Registrant database example file: config/database-example-registrant.yml diff --git a/config/application-example.yml b/config/application-example.yml index 840e13447..f89a2b708 100644 --- a/config/application-example.yml +++ b/config/application-example.yml @@ -5,6 +5,10 @@ zonefile_export_dir: 'export/zonefiles' bank_statement_import_dir: 'import/bank_statements' legal_documents_dir: 'import/legal_documents' +# New Relic app name, keep only current mode, remove other names. +# Example: 'Admin, EPP, REPP' will have name 'Admin, EPP, REPP - production' at New Relic. +new_relic_app_name: 'Admin, EPP, REPP, Registrar, Registrant' + # You can use `rake secret` to generate a secure secret key. # Your secret key is used for verifying the integrity of signed cookies. # If you change this key, all old signed cookies will become invalid! diff --git a/config/initializers/new_relic_app_name.rb b/config/initializers/new_relic_app_name.rb new file mode 100644 index 000000000..bc1cf7a78 --- /dev/null +++ b/config/initializers/new_relic_app_name.rb @@ -0,0 +1 @@ +NewRelic::Agent.config[:app_name] = "#{ENV['new_relic_app_name']} - #{Rails.env}" if ENV['new_relic_app_name'].present?