Skip to content

Commit

Permalink
refactor: independent registration
Browse files Browse the repository at this point in the history
  • Loading branch information
arielvalentin committed Oct 8, 2023
1 parent 603c23a commit 86d6d0e
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,9 @@ def self.install
tracer = Instrumentation.instance.tracer
mapper = AttributeMapper.new
default_handler = DefaultHandler.new(tracer, mapper)
@subscriptions ||= []
@subscriptions << ActiveSupport::Notifications.subscribe('discard.active_job', default_handler)
@subscriptions = %w[discard.active_job].map do |key|
ActiveSupport::Notifications.subscribe(key, default_handler)
end
end

def self.uninstall
Expand Down

0 comments on commit 86d6d0e

Please sign in to comment.