lib/sidekiq/middleware/server/datadog.rb in sidekiq-datadog-0.3.3 vs lib/sidekiq/middleware/server/datadog.rb in sidekiq-datadog-0.3.4

- old
+ new

@@ -1,8 +1,8 @@ require 'sidekiq' require 'sidekiq/datadog/version' -require 'statsd' +require 'datadog/statsd' require 'socket' module Sidekiq module Middleware module Server @@ -27,10 +27,10 @@ hostname = opts[:hostname] || ENV['INSTRUMENTATION_HOSTNAME'] || Socket.gethostname statsd_host = opts[:statsd_host] || ENV['STATSD_HOST'] || "localhost" statsd_port = (opts[:statsd_port] || ENV['STATSD_PORT'] || 8125).to_i @metric_name = opts[:metric_name] || "sidekiq.job" - @statsd = opts[:statsd] || ::Statsd.new(statsd_host, statsd_port) + @statsd = opts[:statsd] || ::Datadog::Statsd.new(statsd_host, statsd_port) @tags = opts[:tags] || [] if @tags.none? {|t| t =~ /^host\:/ } @tags.push("host:#{hostname}") end