Allow specifying STATSD_NAMESPACE (#5700)

lolsob-rspec
Eugen Rochko 2017-11-14 23:22:43 +01:00 committed by Yamagishi Kazutoshi
parent 80873c1134
commit a71791e3f1
1 changed files with 1 additions and 1 deletions

View File

@ -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)