From 306eb6e9c90295dcdff2a0094066542a46a8e634 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Wed, 18 Jan 2017 23:44:29 +0100 Subject: Add optional StatsD performance tracking --- config/environments/production.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'config/environments') 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 -- cgit