From 546257bc7f75538993470b1a53f2095f801c069d Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Tue, 14 Nov 2017 23:22:43 +0100 Subject: [PATCH] Allow specifying STATSD_NAMESPACE (#5700) --- config/initializers/statsd.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)