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
Our rails app doesn't yet use ActiveRecord::Base for anything, but has some code that relies on the ActiveRecord library. In dev/test we have basically the default database.yml file with sqlite for dev/test, but production had a misconfiguration (e.g. database: '').
Since we never call ActiveRecord::Base explicitly in production it never caused exceptions. Sentry messages were silently failing to send in production, but worked in dev. If I set config.background_worker_threads = 0, it would work in production.
The issue appears to be this code from sentry-rails:
module Sentry
class BackgroundWorker
def perform(&block)
@executor.post do
# make sure the background worker returns AR connection if it accidentally acquire one during serialization
ActiveRecord::Base.connection_pool.with_connection do
block.call
end
end
end
end
end
When I correctly configured the dummy sqlite connection, it worked in production.
Reproduction Steps
Default sentry-rails install with a misconfigured database.yml:
# sentry.rb
Sentry.init do |config|
config.dsn = ENV["SENTRY_DSN"]
config.breadcrumbs_logger = [:active_support_logger, :http_logger]
config.traces_sample_rate = 1.0
end
Issue Description
Our rails app doesn't yet use
ActiveRecord::Base
for anything, but has some code that relies on the ActiveRecord library. In dev/test we have basically the defaultdatabase.yml
file with sqlite for dev/test, but production had a misconfiguration (e.g.database: ''
).Since we never call ActiveRecord::Base explicitly in production it never caused exceptions. Sentry messages were silently failing to send in production, but worked in dev. If I set
config.background_worker_threads = 0
, it would work in production.The issue appears to be this code from sentry-rails:
When I correctly configured the dummy sqlite connection, it worked in production.
Reproduction Steps
Default sentry-rails install with a misconfigured
database.yml
:Call
Sentry.capture_message("test")
Expected Behavior
"Test" message captured OR log or inline message explaining where it failed.
Actual Behavior
No message at sentry.io. With sentry debug turned on, there are no indications of failure.
Ruby Version
2.6.8
SDK Version
4.8.0
Integration and Its Version
Rails
Sentry Config
The text was updated successfully, but these errors were encountered: