about summary refs log tree commit diff
path: root/config/environments
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2017-01-18 23:44:29 +0100
committerEugen Rochko <eugen@zeonfederated.com>2017-01-18 23:44:29 +0100
commit306eb6e9c90295dcdff2a0094066542a46a8e634 (patch)
tree10851d9b6eb2d81f5249769dc35bd2c1fb7d61d1 /config/environments
parent7cfd5b680a64e2dcdc375274d9619e8ab2e2bb9f (diff)
Add optional StatsD performance tracking
Diffstat (limited to 'config/environments')
-rw-r--r--config/environments/production.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/config/environments/production.rb b/config/environments/production.rb
index 8b8d974b3..30170e810 100644
--- a/config/environments/production.rb
+++ b/config/environments/production.rb
@@ -104,4 +104,8 @@ Rails.application.configure do
   config.react.variant = :production
 
   config.active_record.logger = nil
+
+  config.to_prepare do
+    StatsD.backend = StatsD::Instrument::Backends::NullBackend if ENV['STATSD_ADDR'].blank?
+  end
 end