17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
# File 'lib/exekutor/plugins/appsignal.rb', line 17
def invoke_with_instrumentation(job)
payload = job[:payload]
params = ::Appsignal::Utils::HashSanitizer.sanitize(
payload.fetch("arguments", {}),
::Appsignal.config[:filter_parameters]
)
::Appsignal.monitor_transaction(
"perform_job.exekutor",
class: payload["job_class"],
method: "perform",
params: params,
metadata: {
id: payload["job_id"],
queue: payload["queue_name"],
priority: payload.fetch("priority", Exekutor.config.default_queue_priority),
attempts: payload.fetch("attempts", 0)
},
queue_start: job[:scheduled_at]
) do
yield job
end
end
|