lib/logstash/outputs/dogstatsd.rb in logstash-output-dogstatsd-2.0.0 vs lib/logstash/outputs/dogstatsd.rb in logstash-output-dogstatsd-5.0.0

- old
+ new

@@ -1,17 +1,8 @@ # encoding: utf-8 require "logstash/outputs/base" require "logstash/namespace" - -# This is a hack to load the dogstatsd-ruby gem's statsd.rb file into a -# namespace so as to not clobber the top-level Statsd provided by the -# much-more-popular Statsd gem. The problem is that both gems have a file named -# 'statsd.rb' that you are supposed to load. Why did Datadog not name their file -# differently? Who knows! -# (see: https://github.com/DataDog/dogstatsd-ruby/pull/3) -module Datadog - module_eval(File.read(Gem.find_files('**/statsd.rb').grep(/dogstatsd/).first)) -end +require "datadog/statsd" # dogstatsd is a fork of the statsd protocol which aggregates statistics, such # as counters and timers, and ships them over UDP to the dogstatsd-server # running as part of the Datadog Agent. Dogstatsd adds support for metric tags, # which are used to slice metrics along various dimensions.