Closed
Description
openedon Mar 10, 2021
Describe the bug
exceptions in rails/runner jobs don't appear to be getting captured
To Reproduce
from project command line
./bin/rails runner 'Sentry.capture_message("test sentry runner capture")'
swapping back to sentry-raven (= 3.1.1)
with below raven config and attempting:
./bin/rails runner 'Raven.capture_message("test old raven runner capture")'
sends messages to our sentry dashboard as expected.
(I've added development to environments in order to test locally, of course).
I've also verified that the jobs are getting the proper environment at runtime to match one of the expected/ enabled envs.
potential regression from raven fix - #325
Expected behavior
Exceptions/ messages log to our sentry project
Actual behavior
No exceptions or messages are being logged
Environment
- Ruby Version: 2.7.1
- SDK Version:
- sentry-rails (= 4.2.2)
- sentry-ruby (= 4.2.2)
- sentry-sidekiq (= 4.2.1)
- Rails 6.0.3.5
- Sidekiq 6.1.3
- Whenever 1.0.0 (cron job creation)
Current Sentry Config
This is not necessary but could be helpful.
Sentry.init do |config|
config.dsn = 'MY_DSN'
config.enabled_environments = %w[production staging]
config.environment = "#{Rails.env}-console" if defined?(Rails::Console)
config.breadcrumbs_logger = %i[sentry_logger active_support_logger]
# set a uniform sample rate between 0.0 and 1.0
config.traces_sample_rate = 0.2
end
Old Raven Config
Raven.configure do |config|
config.dsn = 'MY_DSN'
config.sanitize_fields = Rails.application.config.filter_parameters.map(&:to_s)
config.environments = %w[production staging]
config.current_environment = "#{Rails.env}-console" if defined?(Rails::Console)
end
Activity