Permalink
Browse files

Simpler approach to setting implementation properly.

  • Loading branch information...
1 parent 20eccf0 commit a8966d18b046d8c9e337414cd5d15df980353acd @wvanbergen wvanbergen committed Feb 5, 2014
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/statsd/instrument.rb
View
@@ -224,5 +224,5 @@ def self.generate_packet(k, v, op, sample_rate = default_sample_rate, tags = nil
StatsD.enabled = true
StatsD.default_sample_rate = 1.0
-StatsD.implementation = ENV.has_key?('STATSD_IMPLEMENTATION') ? ENV['STATSD_IMPLEMENTATION'].to_sym : :statsd
+StatsD.implementation = ENV.fetch('STATSD_IMPLEMENTATION', 'statsd').to_sym
StatsD.server = ENV['STATSD_ADDR'] if ENV.has_key?('STATSD_ADDR')

0 comments on commit a8966d1

Please sign in to comment.