lib/sidekiq/middleware/server/datadog.rb in sidekiq-datadog-0.5.1 vs lib/sidekiq/middleware/server/datadog.rb in sidekiq-datadog-0.5.2

- old
+ new

@@ -40,11 +40,11 @@ @tags.push("env:#{ENV['RACK_ENV']}") if env && include_tag?('env') && @tags.none? {|t| t =~ /^env\:/ } end def call(worker, job, queue, *) start = Time.now - clock = Process.clock_gettime(Process::CLOCK_MONOTONIC, :millisecond) + clock = ::Process.clock_gettime(::Process::CLOCK_MONOTONIC, :millisecond) begin yield record(worker, job, queue, start, clock) rescue StandardError => e @@ -54,10 +54,10 @@ end private def record(worker, job, queue, start, clock, error=nil) # rubocop:disable Metrics/ParameterLists - msec = Process.clock_gettime(Process::CLOCK_MONOTONIC, :millisecond) - clock + msec = ::Process.clock_gettime(::Process::CLOCK_MONOTONIC, :millisecond) - clock tags = build_tags(worker, job, queue, error) @statsd.increment @metric_name, tags: tags @statsd.timing "#{@metric_name}.time", msec, tags: tags