Remove NewRelic integration.
Remove the NewRelic integration in preparation for migrating to Elastic APM instead.
This commit is contained in:
@@ -49,9 +49,9 @@ module Danbooru
|
||||
config.active_record.schema_format = :sql
|
||||
config.encoding = "utf-8"
|
||||
|
||||
# Hide sensitive model attributes and request params in exception messages,
|
||||
# log files, and in NewRelic. These are substring matches, so they match
|
||||
# any attribute or request param containing the word 'password' etc.
|
||||
# Hide sensitive model attributes and request params in exception messages
|
||||
# and logs. These are substring matches, so they match any attribute or
|
||||
# request param containing the word 'password' etc.
|
||||
#
|
||||
# https://guides.rubyonrails.org/configuring.html#config-filter-parameters
|
||||
config.filter_parameters += [:password, :api_key, :secret, :ip_addr, :address, :email_verification_key, :signed_user_id] if Rails.env.production?
|
||||
|
||||
@@ -547,12 +547,6 @@ module Danbooru
|
||||
# "redis://localhost:6379"
|
||||
end
|
||||
|
||||
# Optional. The license key for your New Relic account.
|
||||
# https://newrelic.com/
|
||||
# https://docs.newrelic.com/docs/accounts/accounts-billing/account-setup/new-relic-license-key/
|
||||
def new_relic_license_key
|
||||
end
|
||||
|
||||
# True if the Winter Sale is active.
|
||||
def is_promotion?
|
||||
false
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
if Danbooru.config.new_relic_license_key.present?
|
||||
require "new_relic/control"
|
||||
|
||||
# https://github.com/newrelic/newrelic-ruby-agent/blob/1ef4082fe97fd19aeccb3f392a44ef3becae66d3/lib/newrelic_rpm.rb#L40
|
||||
# https://github.com/newrelic/newrelic-ruby-agent/blob/1ef4082fe97fd19aeccb3f392a44ef3becae66d3/lib/new_relic/agent.rb#L349
|
||||
NewRelic::Control.instance.init_plugin(
|
||||
app_name: Danbooru.config.canonical_app_name,
|
||||
license_key: Danbooru.config.new_relic_license_key,
|
||||
log_level: Danbooru.config.debug_mode ? "debug" : "error",
|
||||
#log: Rails.logger,
|
||||
"rake.tasks": ["maintenance:.*"],
|
||||
"browser_monitoring.auto_instrument": false,
|
||||
config: Rails.application.config,
|
||||
)
|
||||
end
|
||||
Reference in New Issue
Block a user