Hi Im using Grape API https://github.com/ruby-grape/grape. How do I configure raven to send exceptions happening in Grape? Thanks.
Hi Steve
What have you tried so far?
Matt
@steverob Are you using Grape standalone as a Rack app, or as part of a Rails app or Sinatra app?
Using it in a Rails app :)
Regards
Steve Robinson
On 01-Oct-2015, at 4:56 PM, Nate Berkopec [email protected] wrote:
@steverob Are you using Grape standalone as a Rack app, or as part of a Rails app or Sinatra app?
—
Reply to this email directly or view it on GitHub.
@nateberkopec any answer please? I am using Grape inside of Rails too and I would like to setup Sentry just for the Grape part without affecting Rails at all ... is it possible?
Try this:
In your Gemfile:
gem 'sentry-raven', require: 'sentry-raven-without-integrations'
Then in your Grape controller:
require 'raven/integrations/rack'
class API < Grape::API
use Raven::Rack
end
@nateberkopec In addition I had to do require 'raven/integrations/rack' but it worked! Thank you
Most helpful comment
Try this:
In your Gemfile:
Then in your Grape controller: