Permalink
Browse files

Also set StatsD.mode based on RAILS_ENV/RACK_ENV environment variable…

… if possible
  • Loading branch information...
1 parent 25f4bee commit ab4d4637b47ff9a6b94aae7d03b20cfecc63f14a @wvanbergen wvanbergen committed Feb 5, 2014
Showing with 1 addition and 0 deletions.
  1. +1 −0 lib/statsd/instrument.rb
View
@@ -226,3 +226,4 @@ def self.generate_packet(k, v, op, sample_rate = default_sample_rate, tags = nil
StatsD.default_sample_rate = 1.0
StatsD.implementation = ENV.fetch('STATSD_IMPLEMENTATION', 'statsd').to_sym
StatsD.server = ENV['STATSD_ADDR'] if ENV.has_key?('STATSD_ADDR')
+StatsD.mode = ENV['RAILS_ENV'] || ENV['RACK_ENV'] || 'development'

0 comments on commit ab4d463

Please sign in to comment.