After installing the gem you need to add the AppSignal integration require
1 2 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.
Since AppSignal gem version 1.3 you no longer need to manually include the
Appsignal::Rack::SinatraInstrumentation middleware in your application.
Please remove it from your application.
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.
1 2 3 4 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.