lib/request_tracer/integration/sidekiq_handler.rb in request-tracer-0.6.2 vs lib/request_tracer/integration/sidekiq_handler.rb in request-tracer-0.6.3
- old
+ new
@@ -23,11 +23,13 @@
end
end
class ClientMiddleware
def call(worker_class, job, queue, redis_pool)
- job['trace'] = Trace.latest.to_h
- yield
+ Trace.record do |trace|
+ job['trace'] = trace.to_h
+ yield
+ end
end
end
end
end
end