custom error tracking middleware like raygun / sentry / etc?
TSMMark opened this issue · 2 comments
Getting Internal Server Error
on prod, but not on local. No detailed error message or any information is visible, so I'm hoping to use our general error tracking service Raygun to record the error as a ticket.
I'm hoping it would be as simple as just using the middleware like this:
Split::Dashboard.use Raygun::Middleware::RackExceptionInterceptor
Any idea if this should work?
^ It does not work.
I'm assuming the Rack::Dashboard
has its own exception-rescuing middleware that is containing the error before the raygun middleware can catch it. Is it possible to add a middleware or prepend it so that it is inside the other middlewares? I would like the raygun middleware to intercept the exception before the other split dashboard middlewares.
Okay so I figured out Sinatra is swallowing the error, and I found the option to raise errors from Sinatra instead:
Split::Dashboard.set :raise_errors, true