Class: Mnemosyne::Probes::ActiveJob::Perform::Probe
- Inherits:
-
Mnemosyne::Probe
- Object
- Mnemosyne::Probe
- Mnemosyne::Probes::ActiveJob::Perform::Probe
- Defined in:
- lib/mnemosyne/probes/active_job/perform.rb
Instance Method Summary collapse
Methods inherited from Mnemosyne::Probe
#install, #setup, subscribe, subscriptions
Methods included from Logging
Instance Method Details
#call(trace, _name, start, finish, _id, payload) ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/mnemosyne/probes/active_job/perform.rb', line 10 def call(trace, _name, start, finish, _id, payload) start = ::Mnemosyne::Clock.to_tick(start) finish = ::Mnemosyne::Clock.to_tick(finish) job = payload[:job] = { id: job.job_id, job: job.class.name, arguments: job.arguments, queue: job.queue_name } span = ::Mnemosyne::Span.new( 'app.job.perform.active_job', start:, finish:, meta: ) trace << span end |