Skip to content

Instantly share code, notes, and snippets.

@thijsc
Created July 10, 2017 19:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thijsc/a2d2643e81f737f0c5543a9ece8320ae to your computer and use it in GitHub Desktop.
Save thijsc/a2d2643e81f737f0c5543a9ece8320ae to your computer and use it in GitHub Desktop.
Barebones standalone Ruby app with AppSignal
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
source 'https://rubygems.org'
gem "appsignal"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment