Hi all,
I set up Sentry using raven-ruby gem, after I defined configuration file, it very simple:
# config/initializers/sentry.rb
Raven.configure do |config|
config.dsn = 'https://***'
config.sanitize_fields = Rails.application.config.filter_parameters.map(&:to_s)
config.excluded_exceptions += ['PG::UniqueViolation']
config.async = lambda { |event|
SentryDeliveryWorker.perform_async(event.to_hash)
}
end
I can run rake raven:test
to send a test event, and it went and displayed to my Sentry server:
rake raven:test
-> Sending a test event:
->
=================== SENTRY =================
-> -> event ID: 0250e3d7bcb94fc2ba848febf4e9d3fb
->
-> Done!
But I does not record any exception via controller, example when I make a call to api even if I raise a custom exception explicitly. I try to print out a message in:
config.async = lambda { |event|
puts "=== Start Sentry Job === "
SentryDeliveryWorker.perform_async(event.to_hash)
}
But there is nothing is printed out, do I miss something with configuration?
Thanks for any help,
Robert