Sha256: e9cc40bbc6d70fddb417e32ed6891ae45cfaf1036b3d31cc09dd95f5043339a7
Contents?: true
Size: 674 Bytes
Versions: 22
Compression:
Stored size: 674 Bytes
Contents
# frozen_string_literal: true module Mnemosyne class Probe include ::Mnemosyne::Logging def install setup self.class.subscriptions.each do |subscribe| ::ActiveSupport::Notifications.subscribe(subscribe) do |*args| trace = ::Mnemosyne::Instrumenter.current_trace next unless trace call(trace, *args) end end logger.debug(Mnemosyne) { "Installed probe #{self.class.name}" } end def setup # noop end class << self def subscriptions @subscriptions ||= Set.new end def subscribe(name) subscriptions << name end end end end
Version data entries
22 entries across 22 versions & 1 rubygems