Created
July 10, 2017 19:16
-
-
Save thijsc/a2d2643e81f737f0c5543a9ece8320ae to your computer and use it in GitHub Desktop.
Barebones standalone Ruby app with AppSignal
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "appsignal" | |
ENV['APPSIGNAL_ACTIVE'] = "true" | |
ENV['APPSIGNAL_APP_NAME'] = "Standalone app" | |
ENV['APPSIGNAL_APP_ENV'] = "development" | |
ENV['APPSIGNAL_PUSH_API_KEY'] = raise "Provide push api key" | |
Appsignal.start_logger | |
Appsignal.start | |
Appsignal.monitor_single_transaction( | |
"perform_job.custom", | |
:class => "Test", | |
:method => 'run' | |
) do | |
Appsignal.instrument 'event' do | |
sleep 5 | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source 'https://rubygems.org' | |
gem "appsignal" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment