Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Use Honeycomb to trace ActiveRecord calls inside of ActiveJob
class ApplicationJob < ActiveJob::Base
around_perform do |job, block|
if Honeycomb.client
Honeycomb.span(job.class.name, type: 'worker', fields: {'queue.name': job.queue_name}, &block)
end
end
end
@qrush

This comment has been minimized.

Copy link
Owner Author

commented Jun 10, 2019

This gist adds a new trace for each job your Sidekiq (or whatever runs your jobs) runs:

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.