Skip to content

Instantly share code, notes, and snippets.

@matsimitsu
Created October 27, 2016 13:08
Show Gist options
  • Save matsimitsu/ac250382a8b43f44a7f0ff85833f56d0 to your computer and use it in GitHub Desktop.
Save matsimitsu/ac250382a8b43f44a7f0ff85833f56d0 to your computer and use it in GitHub Desktop.
require "appsignal"
Appsignal.config = Appsignal::Config.new(
File.expand_path(File.dirname(__FILE__)),
"development"
)
Appsignal.start
class DailyProcessor
def self.process_today
# Randomly raise an error
raise 'moo' if rand(2) == 1
rescue => e
Appsignal.send_error(e)
end
end
DailyProcessor.process_today
Appsignal.stop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment