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
Application/framework names and versions (e.g. Rails, Sinatra, Puma, etc.).
None
Rails Semantic Logger Version, if applicable.
None
Rails configuration. Only need the settings related to Rails Semantic Logger and Semantic Logger.
None
Full Stack Trace, if an exception is being raised.
Attached below
Expected Behavior
require'bundler/inline'gemfiledosource'https://rubygems.org'gem'semantic_logger','4.15.0'gem'sentry-ruby','5.17.3'end# Condition 1: Enable sync modeSemanticLogger.sync!# Condition 2: Enable sentry_ruby appenderSemanticLogger.add_appender(appender: :sentry_ruby)Sentry.initdo |config|
# Condition 3: Use semantic_logger as Sentry's loggerconfig.logger=SemanticLogger[Sentry]# Condition 4: Disable non-blocking modeconfig.background_worker_threads=0config.dsn='http://foo@localhost/bar'# Fake value, needed to reproduce the errorendlogger=SemanticLogger['MyClass']beginraise'something went wrong'rescue=>e# Expected: `e` is sent to Sentry# Actual: `e` is not sent to Sentry; SemanticLogger::Appenders -- Failed to log to appender: SemanticLogger::Appender::SentryRuby -- Exception: ThreadError: deadlock; recursive lockinglogger.error('oops',e)end
As I commented, the Sentry appender fails to send error logs to Sentry when these conditions are met:
Environment
Expected Behavior
As I commented, the Sentry appender fails to send error logs to Sentry when these conditions are met:
Actual Behavior
Sentry appender fails to send error logs to Sentry.
Pull Request
I'm thinking of changing
@mutex
from Mutex to Monitor, which allows recursive locking.https://ruby-doc.org/3.3.3/exts/monitor/Monitor.html
The text was updated successfully, but these errors were encountered: