After installing the gem you need to add the AppSignal integration require
require "sinatra" # or require 'sinatra/base' require "appsignal/integrations/sinatra"
Then create the AppSignal configuration file,
config/appsignal.yml. See the
Ruby configuration page for more details on how to
After these steps, start your Sinatra app and wait for data to arrive in AppSignal.
To ignore a specific Sinatra error set the
sinatra.skip_appsignal_error flag in the request environment. This will tell AppSignal to ignore the error that occurs during the request. This allows you to stop reporting of errors to AppSignal.
Only ignore errors like this if you need to ignore errors from a Sinatra app using code. See the
ignore_errors option to ignore it for the entire app. If you don't want to be notified about an error, see our notification settings.
get "/" do env["sinatra.skip_appsignal_error"] = true # Add this line to an endpoint or callback raise "uh oh" # Example error, don't copy this end
We have two example applications in our examples repository on GitHub. The examples show how to set up AppSignal in small Sinatra applications and modular Sinatra applications.