When ::ActiveSupport::BroadcastLogger is not defined (Rails < 7.1) and ::Rails.logger instance has broadcasts method defined, initialization of Sentry-ruby fails on NameError: uninitialized constant ActiveSupport::BroadcastLogger (NameError).
I suggest changing the check to ::Rails.logger being an instance of ::ActiveSupport::BroadcastLogger (with a defined? check).
Merging #2169 (6f46a71) into master (e082644) will increase coverage by 0.09%.
Report is 2 commits behind head on master.
The diff coverage is 100.00%.
Description
When
::ActiveSupport::BroadcastLogger
is not defined (Rails < 7.1) and::Rails.logger
instance hasbroadcasts
method defined, initialization of Sentry-ruby fails onNameError: uninitialized constant ActiveSupport::BroadcastLogger (NameError)
.I suggest changing the check to
::Rails.logger
being an instance of::ActiveSupport::BroadcastLogger
(with adefined?
check).