You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
foo RuntimeError is not captured and not sent to Sentry
Environment
Ruby Version: 2.7.1
SDK Version: 4.7.1
Integration Versions (if any):
Rails 6.1.3.2,
Resque 2.0.0,
sentry-rails 4.7.1
Sentry Config
Sentry.initdo |config|
config.dsn="..."config.breadcrumbs_logger=[:active_support_logger,:http_logger]# Sent events only for the below environmentsconfig.enabled_environments=%w[developmentstagingproduction]config.background_worker_threads=0filter=ActiveSupport::ParameterFilter.new(Rails.application.config.filter_parameters)config.before_send=lambdado |event,_hint|
filter.filter(event.to_hash)endend
The text was updated successfully, but these errors were encountered:
@tsrivishnu ok it's because resque worker doesn't contain either RAILS_ENV or RACK_ENV, so the SDK uses a default "default" environment (inherited from the old SDK). and because it's not in your enabled_environments, event capturing is disabled.
I think you can make it work by adding default to the list.
I'll make a PR to change the default environment to 'development'.
@st0012 Thank you. I confirm that it works after adding default to the enabled_environments list or passing RAILS_ENV=development to the Resque worker. 👍🏽
Feel free to close this issue or keep it open for you to track the PR to change the default environment to 'development'.
Describe the bug
Exceptions from ActiveJob jobs are not sent to Sentry. The jobs simply fail and no errors are sent to Sentry.
I'm not sure if I'm missing any configuration options for this to work correctly.
To Reproduce
$ bundle exec rake environment resque:work QUEUE=*
Expected behavior
foo
RuntimeError is captured and sent to SentryActual behavior
foo
RuntimeError is not captured and not sent to SentryEnvironment
Sentry Config
The text was updated successfully, but these errors were encountered: