about summary refs log tree commit diff
path: root/config
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2017-11-14 23:22:43 +0100
committerYamagishi Kazutoshi <ykzts@desire.sh>2017-11-15 07:22:43 +0900
commit546257bc7f75538993470b1a53f2095f801c069d (patch)
treeec3b5a05b848a32b5a88904e4d4b323d850055db /config
parentfbef909c2a1ff8d24811f76237e62fbef6cc63cc (diff)
Allow specifying STATSD_NAMESPACE (#5700)
Diffstat (limited to 'config')
-rw-r--r--config/initializers/statsd.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/config/initializers/statsd.rb b/config/initializers/statsd.rb
index 17a176174..45702ac94 100644
--- a/config/initializers/statsd.rb
+++ b/config/initializers/statsd.rb
@@ -4,7 +4,7 @@ if ENV['STATSD_ADDR'].present?
   host, port = ENV['STATSD_ADDR'].split(':')
 
   statsd = ::Statsd.new(host, port)
-  statsd.namespace = ['Mastodon', Rails.env].join('.')
+  statsd.namespace = ENV.fetch('STATSD_NAMESPACE') { ['Mastodon', Rails.env].join('.') }
 
   ::NSA.inform_statsd(statsd) do |informant|
     informant.collect(:action_controller, :web)