allow custom app_name prefixes for newrelic
This commit is contained in:
parent
abd8fb104c
commit
e461956a97
3 changed files with 6 additions and 2 deletions
|
|
@ -94,6 +94,10 @@ HELP
|
||||||
File.exists?(File.join(Rails.root, "config", "app.yml")) || (File.exists?(File.join(Rails.root, "config", "app_config.yml")))
|
File.exists?(File.join(Rails.root, "config", "app.yml")) || (File.exists?(File.join(Rails.root, "config", "app_config.yml")))
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def self.new_relic_app_name
|
||||||
|
self[:new_relic_app_name] || self[:pod_uri].host
|
||||||
|
end
|
||||||
|
|
||||||
def self.normalize_pod_url
|
def self.normalize_pod_url
|
||||||
unless self[:pod_url] =~ /^(https?:\/\/)/ # starts with http:// or https://
|
unless self[:pod_url] =~ /^(https?:\/\/)/ # starts with http:// or https://
|
||||||
self[:pod_url] = "http://#{self[:pod_url]}"
|
self[:pod_url] = "http://#{self[:pod_url]}"
|
||||||
|
|
|
||||||
|
|
@ -114,7 +114,7 @@ defaults: &defaults
|
||||||
# Miscellaneous
|
# Miscellaneous
|
||||||
|
|
||||||
NEW_RELIC_LICENSE_KEY: ''
|
NEW_RELIC_LICENSE_KEY: ''
|
||||||
|
new_relic_app_name: ''
|
||||||
|
|
||||||
# If set to true Diaspora will work with just the appserver, thin by default,
|
# If set to true Diaspora will work with just the appserver, thin by default,
|
||||||
# running, however this makes it quite slow as all the time intensive jobs
|
# running, however this makes it quite slow as all the time intensive jobs
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@ common: &default_settings
|
||||||
# "All UI" then specify a semicolon-separated list of up to three
|
# "All UI" then specify a semicolon-separated list of up to three
|
||||||
# distinct names. If you comment this out, it defaults to the
|
# distinct names. If you comment this out, it defaults to the
|
||||||
# capitalized RAILS_ENV (i.e., Production, Staging, etc)
|
# capitalized RAILS_ENV (i.e., Production, Staging, etc)
|
||||||
app_name: <%= AppConfig[:pod_uri].host%>
|
app_name: <%= AppConfig.new_relic_app_name %>
|
||||||
|
|
||||||
# When "true", the agent collects performance data about your
|
# When "true", the agent collects performance data about your
|
||||||
# application and reports this data to the New Relic service at
|
# application and reports this data to the New Relic service at
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue