I've just implemented Raven for both our production and staging environment. On our staging environment (RACK_ENV=staging) for some reason I keep seeing these lines every so seconds:
Apr 13 16:27:04 api-staging staging.log: I, [2016-04-13T14:27:03.938611 #1277] INFO -- : ** [Raven] Raven 0.15.6 configured not to send errors.
Apr 13 16:27:04 api-staging staging.log: I, [2016-04-13T14:27:04.288453 #1277] INFO -- : ** [Raven] Raven 0.15.6 ready to catch errors
Apr 13 16:28:04 api-staging staging.log: I, [2016-04-13T14:28:04.244361 #1386] INFO -- : ** [Raven] Raven 0.15.6 configured not to send errors.
Apr 13 16:28:04 api-staging staging.log: I, [2016-04-13T14:28:04.591488 #1386] INFO -- : ** [Raven] Raven 0.15.6 ready to catch errors
Apr 13 16:29:04 api-staging staging.log: I, [2016-04-13T14:29:04.493725 #1494] INFO -- : ** [Raven] Raven 0.15.6 configured not to send errors.
Apr 13 16:29:04 api-staging staging.log: I, [2016-04-13T14:29:04.846543 #1494] INFO -- : ** [Raven] Raven 0.15.6 ready to catch errors
Apr 13 16:30:04 api-staging staging.log: I, [2016-04-13T14:30:04.574059 #1600] INFO -- : ** [Raven] Raven 0.15.6 configured not to send errors.
Apr 13 16:30:04 api-staging staging.log: I, [2016-04-13T14:30:04.928781 #1600] INFO -- : ** [Raven] Raven 0.15.6 ready to catch errors
Apr 13 16:31:03 api-staging staging.log: I, [2016-04-13T14:31:03.717922 #1711] INFO -- : ** [Raven] Raven 0.15.6 configured not to send errors.
Apr 13 16:31:04 api-staging staging.log: I, [2016-04-13T14:31:04.056313 #1711] INFO -- : ** [Raven] Raven 0.15.6 ready to catch errors
It's a rails 4 application. Raven is loaded using an initializer (initializers/raven.rb) and I've already removed the config setting that was restriction Raven to only log on production and staging. On production this doesn't seem to happen.
Any clue why this is happening?
Weird. Can you post your initializers/raven.rb?
#API Sentry Raven configuration
Raven.configure do |config|
config.dsn = '[my dsn]'
# config.environments = ['staging', 'production']
end
I've started to see the following in e.g. development environment, maybe related:
** [Raven] Raven 0.15.6 configured not to send errors.
Configuration:
Raven.configure do |config|
config.dsn = 'xxx'
config.environments = %w[production]
config.silence_ready = true
end
I think I saw something in the commit history about a change when configuration would be initialized? Not quite sure. Was running 0.15.4 before which did not have that issue.
Happens for me to even when providing silence_ready:
# frozen_string_literal: true
if defined?(Raven) && ENV.key?('SENTRY_DSN')
Raven.configure do |config|
config.silence_ready = true
config.dsn = ENV.fetch('SENTRY_DSN')
config.environments = %w(production)
config.sanitize_fields = Rails.application.config.filter_parameters.map(&:to_s)
end
end
I will test it later again, however I think the message appeared twice before and now appears only once. So maybe the setting is working, Raven is just somehow loaded before. Btw the app is hosted on Heroku. Maybe this helps to track the bug down.
Please report and re-open if Raven 1.2 doesn't fix this for you.
Still have the issue "INFO -- sentry: ** [Raven] Raven 1.2.2 configured not to capture errors." when starting the console.
This fix still works:
Rails.application.config.before_configuration do
Raven.configuration.silence_ready = true
end
Most helpful comment
Still have the issue "INFO -- sentry: ** [Raven] Raven 1.2.2 configured not to capture errors." when starting the console.
This fix still works: