module Roqua::Probes::BaseProbe

Public Instance Methods

call() click to toggle source

do not override me, implement probes by implementing the run method

# File lib/roqua/probes/base_probe.rb, line 18
def call
  run
  Appsignal.increment_counter("probe.call.completed", 1, probe_name: self.class.name.demodulize.underscore)
rescue => e
  Appsignal.send_error(e) { _1.set_namespace(Appsignal::Transaction::BACKGROUND_JOB) }
  raise
end
enable() click to toggle source
# File lib/roqua/probes/base_probe.rb, line 9
def enable
  new.tap do |probe|
    probe_sym = probe.class.to_s.to_sym
    Appsignal::Minutely.probes.register(probe_sym, probe) unless Appsignal::Minutely.probes[probe_sym]
  end
end