lib/sidekiq/middleware/server/datadog.rb in sidekiq-datadog-0.3.1 vs lib/sidekiq/middleware/server/datadog.rb in sidekiq-datadog-0.3.2
- old
+ new
@@ -55,11 +55,11 @@
private
def record(worker, job, queue, start, error = nil)
ms = ((Time.now - start) * 1000).round
- if job["created_at"]
- queued_ms = start - Time.at(job["created_at"])
+ if job["enqueued_at"]
+ queued_ms = start - Time.at(job["enqueued_at"])
end
name = underscore(job['wrapped'] || worker.class.to_s)
tags = @tags.map do |tag|
case tag when String then tag when Proc then tag.call(worker, job, queue, error) end
end